Open Slechani opened 2 years ago
It's probably no longer relevant, but whoever comes across the same question, it is totally possible. :)
The trick is:
renderCustomNodeElement
.CustomNodeElementProps
for each node. The property hierarchyPointNode
contains the (relative) coordinates of the currently rendered node. Hope this helps.
Hey @kobiakov, Thank you for this. Any chance you have a specific example of this? I can't seem to get it to work.
hey @kobiakov , i'm using "react-d3-tree": "^3.6.1" cant find a property called hierarchyPointNode
.
I can't seem to get it to work.
Hi, i currently have an input where the user can select from multiple strings (each string is the name of a node in the graph), I would like for the graph to zoom to the target node each time the user changes the select value.
I was able to do every step up until the translation, I understand that I need to use the translate prop but I don't know how to "find" the node by its name and how to find the position of the node once I found it.
Does someone know how to find the position of a node in the graph ?
Thanks in advance