How to make classes and packages clickable in HTML pages?

0 votes
asked Sep 23, 2016 in To be sorted by anonymous
I am using PlantUML to generate diagrams from Java source code.

One feature that I do not know how to do in PlantUML that I find very easy to do in Gaphviz is the ability to go to a URL when I click on a class in a diagram. I would love to have this for packages as well.

Another feature is the ability to have a mouse-tip appear when hovering over a class in Graphviz. Would love to have this for packages as well.

Any way to do this in PlantUML?

1 Answer

+1 vote
answered Sep 23, 2016 by plantuml (208,860 points)
This is not very documented (we should probably write a page on this), but you can use hyperlink in your diagram.



svg generated file are clickable. For png, a cmapx file is generated that you have to include in your HTML line.

Does it help you ?
commented Sep 23, 2016 by anonymous
Yes, perfect. Thank you!

In the links you sent me, I do not see any URLs for packages. Does it work for packages as well?
commented Mar 5, 2017 by mnlipp (200 points)
This does not work for nested packages

package org.jgrapes {
    package org.jgrapes.core [[org/jgrapes/core/package-summary.html#package.description]] {

    package {

    package org.jgrapes.http {

No link generated here.
commented Mar 7, 2017 by plantuml (208,860 points)
Thanks for the report!
This should be fixed in last beta:
Tell us if it's not working for you.
commented Mar 7, 2017 by mnlipp (200 points)
Oh, great! Been too impatient, opened a [github issue]( an hour ago (just seen your comment, now I know for the future).

Thanks for your excellent work. Would it be possible to provide such betas as maven snapshots? Getting a jar that is usually taken from a repository in your project configuration is always a bit of a nuisance...
commented Mar 7, 2017 by plantuml (208,860 points)
Unfortunatly, we've got sometimes several beta per day, so we cannot push them to maven.
Anyway, we're going to publish a maven version this week-end.