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

Limited width of Mermaid Gantt Diagrams generated by Kroki #1715

Open
jay-blanc opened this issue Mar 1, 2024 · 6 comments
Open

Limited width of Mermaid Gantt Diagrams generated by Kroki #1715

jay-blanc opened this issue Mar 1, 2024 · 6 comments
Labels
📜 javascript Related to Javascript code

Comments

@jay-blanc
Copy link

Hello,

I'm facing a problem trying to generate Gantt Mermaid Diagram with Kroki.

Context

I'm using Kroki with Antora in order to generate Mermaid Gantt Diagram.
The issue I get is the width of the generated diagrams is limited.
It seems to be a limit of 584px.

How to reproduce the behaviour

Using the Mermaid live editor for a given Gantt diagram, I get a large size allowing the user an easy-to-read diagram.
Here is an example :

image

The source is attached to the issue :

gantt-diagram.txt

When you open it with Kroki through the "Actions / Kroki" button in the live editor, you can see that Kroki limits the width of the rendered diagram :

image

Naturally, I get the same behaviour using it in Antora.

Question

Could you please tell me if it is a bug or if there's a way to set a larger width in the rendered diagram ?

Thanks :)

@ggrossetie
Copy link
Member

I can reproduce this issue, I guess that's because we are configuring the viewport size:

await page.setViewport({ height: 800, width: 600 })

@ggrossetie ggrossetie added the 📜 javascript Related to Javascript code label Mar 7, 2024
@jay-blanc
Copy link
Author

Hello,

Thanks for the answer :)

Would it be possible to configure it maybe through something like this :

mermaid::gantt.mmd[width="100%"]

@ggrossetie
Copy link
Member

I don't recall why we did configure a viewport, we would have to test what happens if we don't specify a viewport.

@ggrossetie
Copy link
Member

I'm a bit confused because we had issues with Mermaid/Puppeteer where memory limits exceeded. My guess was that we were trying to generate a huge PNG file but it seems that it can only generate a 800x600: #1702 🤔

@imysl0
Copy link

imysl0 commented Apr 9, 2024

you can try:
image

@jay-blanc
Copy link
Author

Hello @imysl0

Thank you for your answer !!!

Honestly, I gave up, but thanks to you, I'm ready to take it back !
It's working perfectly :)

Thanks again ;-)

image

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

No branches or pull requests

3 participants