bkrem / react-d3-tree

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

How to center a node #484

Open huy-lv opened 11 months ago

huy-lv commented 11 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 11 months ago

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

try look into the demo

image