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

Pie chart : Title not visible if it is long #5567

Open
surya-srivastava opened this issue Jun 10, 2024 · 0 comments · May be fixed by #5596
Open

Pie chart : Title not visible if it is long #5567

surya-srivastava opened this issue Jun 10, 2024 · 0 comments · May be fixed by #5596
Labels
Status: Triage Needs to be verified, categorized, etc Type: Bug / Error Something isn't working or is incorrect

Comments

@surya-srivastava
Copy link

Description

If the title is long is pie chart then the title gets clipped off the front, making it unreadable

Steps to reproduce

Steps to repro:

  1. go to mermaid.live
  2. Enter this snippet
pie title Weekly Grocery Consumption for a Family of 4
    "Vegetables" : 25
    "Fruits" : 5
    "Cheese" : 5
    "Milk" : 15
    "Eggs" : 15
    "Meat" : 30
    "Bread" : 5

3, observe the title

Screenshots

image

Code Sample

https://www.mermaidchart.com/app/projects/fdaea49f-837b-41a6-aff8-ba87b1e87726/diagrams/765877e3-2586-4c58-9489-2268543d2a9c/version/v0.1/edit

Setup

  • Mermaid version: on mermaid live editor
  • Browser and Version: [Chrome, Edge, Firefox] Chrome

Suggested Solutions

The size of svg is dependent on the pie chart, if we increase the size to adjust for the title as well then it would not clip off.
If this is not possible then maybe we can display title in two lines

Additional Context

No response

@surya-srivastava surya-srivastava added Status: Triage Needs to be verified, categorized, etc Type: Bug / Error Something isn't working or is incorrect labels Jun 10, 2024
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: Bug / Error Something isn't working or is incorrect
Projects
None yet
1 participant