react-d3-graph icon indicating copy to clipboard operation
react-d3-graph copied to clipboard

Question: Is there a way to pan and zoom to specific coordinates on the graph?

Open Taresin opened this issue 4 years ago • 2 comments

Is your feature request related to a problem? Please describe. I would like to programmatically zoom in to a particular node. There is nothing I could find on the documentation. There was a hint at an instance variable called _zoomConfig but there's no examples or documentation on how to use it.

Describe the solution you'd like If modifying _zoomConfig is the expected way to solve the problem, would it be possible to add some documentation supporting how to use it? (I'm happy to learn how to use it and do the documentation myself for others' benefit)

Otherwise, wasn't sure if it was a new feature that needed to be implemented to expose the d3-zoom behavior.

Describe your use case My particular use case is a find and zoom, but I'd imagine there are other use cases for zooming programmatically.

Describe alternatives you've considered N/a

Taresin avatar Dec 10 '20 11:12 Taresin

Please refer to our focusZoom in our official docs and let us know if that's what you're looking for. tl;dr specify a focusedNodeId to focus on a node programmatically.

danielcaldas avatar Dec 17 '20 13:12 danielcaldas

I'm looking for a more general solution to this exact issue in #425

henri-edinb avatar Jan 16 '21 22:01 henri-edinb