Remove the title
- Input
- pie
- Expected output
- gráfico sem cabeçalho
The title keyword is optional; without it the chart is drawn with no header, only the slice legend.
mermaid pie chart
Mermaid pie syntax is the shortest of all diagram types: an optional title and a list of "label" : value entries. This preset already loads a budget-split example across four categories.
The title keyword is optional; without it the chart is drawn with no header, only the slice legend.
The showData directive on the first line adds each slice's numeric value next to the percentage in the legend.
With 13 or more slices, the 12-color palette restarts from the beginning, so the 13th slice reuses the same color as the 1st; to keep every slice visually distinct, the chart needs to be capped at 12 categories.
Mermaid is an open-source JavaScript library that turns plain text, written in its own Markdown-like syntax, into diagrams rendered as SVG. Instead of manually drawing boxes and arrows in a graphics tool, you describe the diagram's structure in a few lines of text and the library computes the layout and draws the result.
No. Mermaid automatically computes each slice's percentage based on the sum of all the given values, so they can be absolute numbers, like currency spent or units sold.
Yes, Mermaid syntax requires double quotes around the label even when it is a single word with no spaces, like "Outros" : 10; without the quotes the parser rejects the line.
Yes, values like 12.5 are accepted normally, which is useful for already-computed percentages or fractional metrics.
Loading the rendering engine...
Your Mermaid code and the rendered diagram stay in your browser, processed by the mermaid.js library. Nothing is sent to any server.