1

Using d3Tree R package to visualize a tree in R Shiny with long labels - is it possible to increase the space between nodes of different levels? Setting the width property doesn't seem to do anything - below is a reproducible example with width set to 1000 (also tried "200%", "auto").

library(d3Tree)
library(tidyverse)
df <- data.frame(Titanic) %>% 
  mutate(Sex = paste(Sex, " long name test"), 
         Age = paste(Age, " long name test"))
d3tree(
  data = list(root = df2tree(struct = df,rootname = 'Titanic'), 
  layout = 'collapse'), 
  width = 1000)

enter image description here

ismirsehregal
  • 30,045
  • 5
  • 31
  • 78
Vlad
  • 3,058
  • 4
  • 25
  • 53

0 Answers0