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

Let the user decide the size and alignment of the produced diagram in the code (no css/json) #3462

Open
whitenoisedev opened this issue Sep 14, 2022 · 3 comments
Labels
Status: Triage Needs to be verified, categorized, etc Type: Enhancement New feature or request

Comments

@whitenoisedev
Copy link

whitenoisedev commented Sep 14, 2022

Is your feature request related to a problem? Please describe.
There is no way to specify the size and position (page alignment: left, centered) of a produced diagram within the diagram description/code itself.
The diagram size can either be absolute (in px), or relative to the page width(in %), or unbounded.

Describe the solution you'd like

align left
size 800px 600px

or

align center
size 80%

Additional context
Right now, only some graph types support some limited configuration regarding their size via directives, some others use json/cli, and some others are sizable only via obscure CSS.

Mermaid cannot be embedded in other tools to create user-definable graphs without this. The users end up having a graph that is too big, too small, not aligned as they would like to be etc.

@whitenoisedev whitenoisedev added Status: Triage Needs to be verified, categorized, etc Type: Enhancement New feature or request labels Sep 14, 2022
@whitenoisedev whitenoisedev changed the title Let the user decide the size of the produced diagram in the code (no css/json) Let the user decide the size and alignment of the produced diagram in the code (no css/json) Nov 15, 2022
@stackengineer
Copy link

I would expect this issue to have garnered more attention by now. My use case is comparing two graphs. I am trying to show where a longer graph diverges from a shorter graph by (left) aligning their starting nodes. Both graphs being centered by default within the markdown causes the similarities/differences to be lost visually.

@sam1am
Copy link

sam1am commented Aug 28, 2023

I am hitting this limitation with mermaid as well.
See here: https://forum.obsidian.md/t/mermaid-pie-chart-is-cut-off-clipped/47699

@whitenoisedev
Copy link
Author

whitenoisedev commented Aug 29, 2023

The pie chart specifically is a different problem.

See #4082

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Status: Triage Needs to be verified, categorized, etc Type: Enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants