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

Alternative layout engines from graphviz #1110

Closed
xeruf opened this issue Sep 2, 2022 · 6 comments
Closed

Alternative layout engines from graphviz #1110

xeruf opened this issue Sep 2, 2022 · 6 comments

Comments

@xeruf
Copy link

xeruf commented Sep 2, 2022

As mentioned in #1078 it could be useful to support the different layout engines of graphviz: https://graphviz.org/docs/layouts/

Furthermore, the plantuml -help is a bit confusing, as it writes at the bottom:

If needed, you can setup the environment variable GRAPHVIZ_DOT.

Without context, without links, I had no idea what to put into this variable until I found the relevant documentation days later: https://plantuml.com/graphviz-dot#fa6a5a3224d7da66

Related issues: #840 and #182

@mcraveiro
Copy link

I am extremely interested in this feature as I am producing very large class diagrams at present. The fact that the classes and namespaces are laid out horizontally means the diagrams are harder to understand. It would be great if one could experiment with other types of layouts, particularly circo [1].

[1] https://en.wikipedia.org/wiki/Circular_layout

@xeruf
Copy link
Author

xeruf commented Oct 8, 2022

@mcraveiro yes :)
I recommend experimenting with alternative layout engines like elk for the meantime: https://plantuml.com/elk

@mcraveiro
Copy link

mcraveiro commented Oct 8, 2022

Ah most interesting, thanks! Sadly when I try it I get:

java.lang.ClassNotFoundException: org.eclipse.elk.graph.util.ElkGraphUtil
	at java.net.URLClassLoader.findClass(URLClassLoader.java:382)
	at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
	at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:349)
	at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
	at java.lang.Class.forName0(Native Method)
	at java.lang.Class.forName(Class.java:264)
	at net.sourceforge.plantuml.elk.proxy.Reflect.callStatic(Reflect.java:129)
	at net.sourceforge.plantuml.elk.proxy.graph.util.ElkGraphUtil.createGraph(ElkGraphUtil.java:28)
	at net.sourceforge.plantuml.elk.CucaDiagramFileMakerElk.createFile(CucaDiagramFileMakerElk.java:366)
	at net.sourceforge.plantuml.cucadiagram.CucaDiagram.exportDiagramInternal(CucaDiagram.java:620)
	at net.sourceforge.plantuml.classdiagram.ClassDiagram.exportDiagramInternal(ClassDiagram.java:188)
	at net.sourceforge.plantuml.UmlDiagram.exportDiagramNow(UmlDiagram.java:135)
	at net.sourceforge.plantuml.AbstractPSystem.exportDiagram(AbstractPSystem.java:179)
	at net.sourceforge.plantuml.PSystemUtils.exportDiagramsDefault(PSystemUtils.java:209)
	at net.sourceforge.plantuml.PSystemUtils.exportDiagrams(PSystemUtils.java:93)
	at net.sourceforge.plantuml.SourceFileReaderAbstract.getGeneratedImages(SourceFileReaderAbstract.java:186)
	at net.sourceforge.plantuml.Run.manageFileInternal(Run.java:518)
	at net.sourceforge.plantuml.Run.processArgs(Run.java:401)
	at net.sourceforge.plantuml.Run.manageAllFiles(Run.java:368)
	at net.sourceforge.plantuml.Run.main(Run.java:203)
java.lang.IllegalArgumentException: java.lang.ClassNotFoundException: org.eclipse.elk.graph.util.ElkGraphUtil

I'll have a look for the missing jars.

@mcraveiro
Copy link

Lol, should have read the docs more carefully :-) worked after installing the ELK jar [1]. Very interesting layout!

[1] http://beta.plantuml.net/elk-full.jar

@xeruf
Copy link
Author

xeruf commented Nov 28, 2022

You could also checkout some parameters mentioned in #261 (comment)

@BenceSzalai
Copy link
Collaborator

[This is an Issue Review]

Duplicate of #60.

Based on that one this is not something on the roadmap of PlantUML.

Either way, any further discussion of the issue should be under #60, so it's all in one place.

@BenceSzalai BenceSzalai closed this as not planned Won't fix, can't repro, duplicate, stale Jan 13, 2023
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

3 participants