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

Longer vertical path #439

Open Momen-Mawad opened 1 year ago

Momen-Mawad commented 1 year ago

Hello,

how do I make the vertical path longer when pathFunc="step" ?

jp1357 commented 1 year ago

I had set the nodeSize (directly as an attribute of Tree)

<Tree
...
nodeSize={{ x: 220, y: 200 }}
/>

I'm pretty sure there is a better way to do it, but this works

Momen-Mawad commented 1 year ago

Hello @jp1357, thank you for your reply.

This indeed will reduce the size of nodes, letting the paths look bigger. But it because I have a picture plus a caption underneath it on top of each node, this solution was not flexible enough.

I was hoping for a way to lengthen the path vertically or horizontally.