uber/react-vis-force

Set scale

JimmyMow opened this issue · 1 comments

Is there a way I can set the default scale or a callback to set the scale of InteractiveForceGraph?

What's happening is I am setting the charge at -500 and when the graph loads it's way too zoomed in

<InteractiveForceGraph
            simulationOptions={
              {
                height: 800,
                width: 800,
                strength: { 
                  charge: -500
                }
              }
            }
            labelAttr='label'
            opacityFactor={1}
            highlightDependencies
            zoomOptions={{ minScale: 0.1, maxScale: 5 }}
            zoom
          >