mermaid
mermaid copied to clipboard
Left align output? (pie chart specifically)
I am starting to work with Mermaidjs inside of Obsidian. One issue I am hitting is there does not seem to be any way to left-align the Pie charts. This causes problems with portions of the output being obscured, especially the labels. See below some related threads:
I found some mention of using Directives to control the output but the documentation seems limited and I could not find anything related to alignment.
Is this or will this be possible? Thank you
example from the live editor: pie chart
I would also like to see this changed, or an option of how to do it.
In Chrome I'm seeing the Pie Chart renders with a width that is too large. Not sure how the width of the Pie Chart compares to the other types of diagrams.
The location of the problem seems to be the following lines:
https://github.com/mermaid-js/mermaid/blob/8dd82839cb8ef660fbe3295c820b57e2a7f9e763/packages/mermaid/src/diagrams/pie/pieRenderer.js#L43
https://github.com/mermaid-js/mermaid/blob/8dd82839cb8ef660fbe3295c820b57e2a7f9e763/packages/mermaid/src/diagrams/pie/pieRenderer.js#L69
Also, the current height is set to be constant, causing bottom whitespace:
https://github.com/mermaid-js/mermaid/blob/8dd82839cb8ef660fbe3295c820b57e2a7f9e763/packages/mermaid/src/diagrams/pie/pieRenderer.js#L17