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

Provide support for other Graphviz layout commands #358

Closed
danyill opened this issue Aug 29, 2020 · 4 comments
Closed

Provide support for other Graphviz layout commands #358

danyill opened this issue Aug 29, 2020 · 4 comments
Labels
🍩 enhancement New feature or request

Comments

@danyill
Copy link

danyill commented Aug 29, 2020

Currently kroki appears only to support the dot command of Graphviz

registry.register(new Graphviz(vertx, config, commander), "graphviz", "dot");

I would be keen to have support for additional layouts (as described in the documentation)

  • circo
  • dot
  • fdp
  • neato
  • osage
  • patchwork
  • sfdp
  • twopi

In each case these could be the name of the graph, with graphviz remaining dot for backwards compatibility.

WDYT?

@ggrossetie
Copy link
Member

I would be keen to have support for additional layouts (as described in the documentation)

I believe that the layout can be defined as a graph attribute: https://graphviz.org/doc/info/attrs.html#d:layout

The default layout is dot but I think it's possible to use another layout. For instance:

digraph g1 {
  layout="circo";
  // ...  
}

For reference, the layout can also be defined as a command line argument: https://graphviz.org/doc/info/command.html#minusK but Kroki does not (yet) support command line arguments. See: #169

In any case, I don't think we should add each layout as diagram types. In my opinion, the diagram type should be graphviz and the layout should be defined as part of the diagram source or as an attribute (not supported yet).

@danyill
Copy link
Author

danyill commented Aug 30, 2020 via email

@ggrossetie ggrossetie added the 🍩 enhancement New feature or request label Sep 9, 2020
@kukimik
Copy link

kukimik commented Jan 11, 2022

Isn't this solved by #827 (see #827 (comment))?

@ggrossetie
Copy link
Member

That's correct, thanks.
It's now possible to specify diagram options: https://docs.kroki.io/kroki/setup/diagram-options/#_graphviz

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🍩 enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants