AdeelK93 / collapsibleTree

Create Interactive Collapsible Tree Diagrams in R using D3.js
https://adeelk93.github.io/collapsibleTree/
158 stars 41 forks source link

is there a way to embed node labels inside a node and space out nodes more? #56

Open StarScream2010 opened 4 years ago

StarScream2010 commented 4 years ago

I'm using the collapsibletree package to create a tree diagram as below. However, as you can see, the node names are rather untidy. Is there a way to embed the node names inside the coloured nodes (rather than adjacent to them, as pictured?) and alter the spacing between node levels (some of the names cut into previous nodes!). I'm open to using alternative r packages too.

Thanks

enter image description here

For reference, here's the code used to produce it

collapsibleTree(
  Geography_Data,
  hierarchy = c("continent", "type", "country"),
  width = 800,
  zoomable = FALSE
)
SyMM1 commented 4 years ago

also is it possible to add number of nodes within the circle? @AdeelK93

SyMM1 commented 4 years ago

For the past few days i have been trying to recreate this tree https://bl.ocks.org/mbhall88/126b3c2c54215b4d1ffbd2d778ce3973#data.tsv . It is similar to collapsible tree. Can you please help me in placing number of nodes within the circle @AdeelK93

doming50 commented 2 years ago

For the past few days i have been trying to recreate this tree https://bl.ocks.org/mbhall88/126b3c2c54215b4d1ffbd2d778ce3973#data.tsv . It is similar to collapsible tree. Can you please help me in placing number of nodes within the circle @AdeelK93

@SyMM1 were you able to recreate it?