Open ShKlinkenberg opened 2 years ago
I managed to solve it. Two things needed to be changed
It would be cool to add tooltipPermanent as an additional argument in the collapsibleTree function.
@ShKlinkenberg thank you, I have tried to do this previously and failed.
@ShKlinkenberg I'm wanting to add a tooltipHTML to my tree, but one that is made with the collapsibleTree() function instead of collapsibleTreeNetwork() function. Currently, collapsibleTree() only allows for numeric tooltips, unless it's in the flat network format and paired with collapsibleTreeNetwork(). However, my nodes do not have unique names and are in a nested lists.
Any suggestions on trying to get strings/HTML to show up for collapsibleTree()? I'm attempting to either make a dataframe that can be read into collapsibleTreeNetwork, or change the underlying code for collapsibleTree to allow for character class arguements for tooltip. But I'm not sure which will be doable.
@ShKlinkenberg I think I figured it out. For future reference I changed the code for collapsibleTree.Node in line 18 from
if(!is.null(tooltipHtml)) if(!(tooltipHtml %in% df$attributes)) stop("tooltipHtml column name is incorrect")
to
if(!is.null(tooltipHtml)) if(!(tooltipHtml %in% df$attributesAll)) stop("tooltipHtml column name is incorrect")
So far it seems to be working as expected.
@askarlupka good catch. I know I haven't been great at maintaining this, but if you want to PR that, I can put out a release
Hi @AdeelK93
I want to create a collapsibleTreeNetwork with a link in the tooltip. I have forked your repo so I could change the mouseout function for hiding the tooltip. I now have some time to actually go to the link. Though the link is not clickable. My three can be found here, and the code here.
I have read this article so I would think it would be possible in D3. Though while looking at the code i do not see a difference in approach.
Do you have any suggestions to get this to work?