Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add hyperlinks to diagram #16

Open
johanwk opened this issue Oct 10, 2022 · 2 comments
Open

Add hyperlinks to diagram #16

johanwk opened this issue Oct 10, 2022 · 2 comments

Comments

@johanwk
Copy link

johanwk commented Oct 10, 2022

With SVG output, PlantUML diagrams can contain links: https://plantuml.com/link

For nodes and edges, this could straightforward to add.

For inlined content with more than one URI, probably PlantUML doesn't support it -- i.e., only one link per row is allowed. However, having nodes and edges linked would already be a great improvement.

@VladimirAlexiev
Copy link
Owner

VladimirAlexiev commented Mar 29, 2024

Ok @johanwk , I can do that. See this diagram and hover over the elements shown in red below:

image

This will be option -link

  • Will work only with puml -Tsvg, right?
  • "inlined content with more than one URI... only one link per row is allowed": No.
    I can go like this:
ex_jahoda : {field} a [[https://example-icecream.org/Vůně ex:Vůně]], [[https://example-icecream.org/Foobar ex:Foobar]]

but I don't like to have all this underlining which will be distracting:
image
So I'll add a skinParam to prevent it

  • parallel arrows collect multiple RDF props on one arrow. So I need to use similar markup on the label.

In summary

skinparam HyperlinkColor black
skinparam HyperlinkUnderline false

class ex_jahoda [[https://example-icecream.org/jahoda]]           '  per class 
ex_jahoda : {field} a [[https://example-icecream.org/Vůně ex:Vůně]], [[https://example-icecream.org/Foobar ex:Foobar]]     ' per value
ex_jahoda : {field} [[https://example-icecream.org/prop ex:prop]] [[https://example-icecream.org/value ex:Value]]    ' per prop and value
_r1711715942r0_ -down-> ex_jahoda : [[http://www.w3.org/2002/07/owl#hasValue owl:hasValue]]\n[[http://www.w3.org/2002/07/owl#fooBar owl:fooBar]]   ' per arrow label

I guess it will take 1-2p/d :-(

@johanwk
Copy link
Author

johanwk commented Mar 29, 2024

Wow, this is simply great!!

I believe links at this detailed level just raises the value of diagrams for documentation. Excellent.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants