Pie Chart Title gets cut off if too long #6232
Labels
Status: Triage
Needs to be verified, categorized, etc
Type: Bug / Error
Something isn't working or is incorrect
Description
When the title of the pie chart is too long, the title is cropped.
Our use case involves some Generative AI to create the title and data that feeds to the charts and in some cases the titles can be lengthy.
It appears that SVG elements don't support text-wrapping or line breaks, but it would be awesome if Mermaid could handle splitting longer titles into multiple elements and adding them to the svg. For now one workaround is using CSS to make the font-size smaller, but that doesn't guarantee no title crop in the case of even lengthier titles.
Could you please provide a fix or alternative solution for this?
Steps to reproduce
Create a pie chart
Give it a long title.
Sample mermaid code in live editor:
pie title Types of industry trends in the last 12 months
Result:
Pie chart title is cropped
Expected:
Title is not cropped
Screenshots
Code Sample
Setup
Suggested Solutions
No response
Additional Context
No response
The text was updated successfully, but these errors were encountered: