Skip to content

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

@surya-srivastava

Description

@surya-srivastava

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Status: TriageNeeds to be verified, categorized, etcType: Bug / ErrorSomething isn't working or is incorrect

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions