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

Add a minimap to visualize one's locatin in huge graphs

Open chabotsi opened this issue 1 year ago • 2 comments

Is your feature request related to a problem? Please describe. When a graph is huge, and we zoom in, it's hard to understand “where” are we located in the graph.

Describe the solution you'd like It would be a very nice option to show a mini-map so users can see there location in the global graph (and not only the zoom part).

Describe alternatives you've considered Found none.

Additional context Here is a screenshot of a zoom graph, with a minimap

image

chabotsi avatar Feb 08 '24 10:02 chabotsi

@chabotsi thanks for reaching out.

You could just overlay a small div on top of the graph canvas with your designed minimap. You can get the nodes coordinates by looking into the { x, y, z } attributes on the data. And for zoom changes you can tap into the onZoom callback prop, which gives you the latest position of the zoomed viewport.

vasturiano avatar Feb 09 '24 20:02 vasturiano

@chabotsi Hey! Was you succeed? Also how did you create your minimap that it shows all the objects after zoom on canvas?

MaksZhukov avatar Apr 29 '24 11:04 MaksZhukov