bkrem / react-d3-tree

:deciduous_tree: React component to create interactive D3 tree graphs
https://bkrem.github.io/react-d3-tree
MIT License
1.06k stars 268 forks source link

How to center a node #484

Open huy-lv opened 8 months ago

huy-lv commented 8 months ago

I need to center a node in a tree by some function like:

<Tree 
    centerNode={null or node id}
/>

or tree.centerNode(nodeId)

What version of react-d3-tree are you using?

^3.6.1

Fray117 commented 8 months ago

I'm pretty sure you should read about "dimensions"

try look into the demo

image