Open charliejhadley opened 6 years ago
Did you figure something out here? Seems like this is pretty useful.
Unfortunately not, I’d happily take recommendations but also aware that I might just need to write this natively rather than via the htmlwidget.
I'd also find this super useful! Awesome package nonetheless.
I figured it out for the mermaid function:
mermaid('
graph LR
A-->B
A-->C
C-->E
B-->D
C-->D
D-->F
E-->F
click B "http://www.github.com" "This is a link"
')
the click B <link>
option requires double quotes, and thankfully R accepts single quotes for the entire mermaid code block.
I'm struggling to find a way to embed a hyperlink into a DiagrammeR output. I've tried using the following approaches without success:
I created a SO question here: https://stackoverflow.com/q/48792355/1659890
For completeness, I've pasted the content of the question below. I hope you don't mind me using your Issues log in this way, please do close if you find it inappropriate. Thanks for making DiagrammeR!
Mermaid
Using
DiagrammeR(diagram = "", type = "mermaid")
it's possible to use HTML tags in the node labels:But to use the
<a>
tag we need to use an=
which the parser vomits over:grViz
Here's the same flowchart as above but with all html stripped out and converted to
grViz
:This doesn't support HTML tags:
create_graph
DiagrammeR
also lets us create graph as follows:But it escapes HTML tags: