Disply images instead of text in collapsibleTree

I am working a project to show how some things are inter-related or associated with each other and I have found collapsibleTree package to almost fit my purpose how ever I am struggling to get images to show instead of the test at the nodes. So far I have managed to get images to show in the tooltip but it is not ideal for my purpose having to hover over each and over object.

library(collapsibleTree)
df <- data.frame(
  Group = c(NA,"Level 1","Level 2","Level 2","Level 2","Level 1","Level 1"),
  Item = c("Level 1",	"Level 2",	"2A",	"2B",	"2C",	"Level 3",	"Level 4"),
  Icon = c(rep("<img src='https://picsum.photos/200'>",7))
)
collapsibleTreeNetwork(df, collapsed = F, tooltipHtml = "Icon")

image
image

I have tried putting the part instead of the Item name but I end up with the tag as the name not the image as I'd expect.

image

Maybe this link could help you:

Hi thanks for you reply I did not get notified and just saw this. I can already achieve this no problem what I want is the picture to show at the node or instead of the text near the node. I did a mock up just to make my needs clearer

image

This topic was automatically closed 42 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.