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

Structurizr: How to generate keys / legends? #1686

Closed
cc-stjm opened this issue Jan 3, 2024 · 4 comments · Fixed by #1705
Closed

Structurizr: How to generate keys / legends? #1686

cc-stjm opened this issue Jan 3, 2024 · 4 comments · Fixed by #1705

Comments

@cc-stjm
Copy link

cc-stjm commented Jan 3, 2024

Is there a way to generate the keys / legends associated with a Structurizr view?

It seems that if you're using the Structurizr CLI to export the plantUML views, the legends are generated as separate files, as e.g. structurizr-systemContext-key.puml for the key for the systemContext view.

However, providing systemContext-key to Kroki doesn't generate the legend.

@cap10bad
Copy link

Did you find the answer to this? I haven't been able to find a way to generate diagram legends.

@ggrossetie
Copy link
Member

Hey @simonbrowndotje, is there something we need to do to support legends/keys?

@simonbrowndotje
Copy link

If supported by the exporter, you just need to output it; see https://github.com/structurizr/cli/blob/master/src/main/java/com/structurizr/cli/export/ExportCommand.java#L148 for an example.

@ggrossetie
Copy link
Member

Kroki outputs a single image, is it possible to embed/include the legend definition in the diagram (and then convert it to an image)?

Something like:

plantumlCommand.convert(diagram.getDefinition() + "\\n\\n" + diagram.getLegend().getDefinition(), fileFormat, new JsonObject());

willson556 added a commit to StaflSystems/kroki that referenced this issue Feb 9, 2024
willson556 added a commit to StaflSystems/kroki that referenced this issue Feb 9, 2024
willson556 added a commit to StaflSystems/kroki that referenced this issue Feb 9, 2024
willson556 added a commit to StaflSystems/kroki that referenced this issue Feb 9, 2024
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

Successfully merging a pull request may close this issue.

4 participants