make node text a link
I have a requirement to navigate to another page when a user clicks on a particular node text (not the frame itself). I tried embedding an tag in the data element itself, but it comes out as text/html, no rendered. Is there a function I could use to inject html rendering of the node text? Will it be clickable?
Thanks!
Hey @iliasaz
Setting the node text to something other than pure text is not an option right now, and I cant see a simple workaround. What probably needs to be done is to change the node creation call to include an SVG <a> before the text name. See https://github.com/spiermar/d3-flame-graph/blob/master/src/flamegraph.js#L346.
This would require a custom build right now, since there's no option to change the default behavior. Something in the lines of the setDetailsHandler option. See https://github.com/spiermar/d3-flame-graph/blob/master/src/flamegraph.js#L791.
If you're interested in implementing this and opening a PR, I'm happy to merge it. Should be a matter of replacing the .text call with a function that can be overridden.
Related to #94.