react-vis-force icon indicating copy to clipboard operation
react-vis-force copied to clipboard

Set scale

Open JimmyMow opened this issue 8 years ago • 1 comments

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

JimmyMow avatar Dec 04 '17 20:12 JimmyMow

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
          >

JimmyMow avatar Dec 04 '17 20:12 JimmyMow