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

[QUESTION] - How to move the position of node text #396

Open JoffreyChevalier opened 2 years ago

JoffreyChevalier commented 2 years ago

Hi everyone ๐Ÿ–๏ธ.

I want to move the position of the node text (name) but i didn't find how to do it despite my research.

If anyone can explain me how to do it, it will make my day ๐Ÿ‘.

Thank you for your answers !

Capture dโ€™รฉcran 2022-06-10 122232

Devamchaudhari commented 2 years ago

Hi @JoffreyChevalier

found one solution, in your custom css write

//For root .noderoot > .rd3t-label > .rd3t-labeltitle{ transform: translate(-17px, 0px); }

//For branch .nodebranch > .rd3t-label > .rd3t-labeltitle { transform: translate(-25px, 0px); }

//set position of x and y coordinates value according to your need

paulano1 commented 1 year ago

@Devamchaudhari Thank you sm!

Devamchaudhari commented 1 year ago

@Devamchaudhari Thank you sm!

welcome :) @paulano1

rajagopalstalwart commented 1 year ago

how to move child nodes in corner, like up and down