Mermaid examplePie Chart

Cloud Cost Breakdown as a Mermaid Pie Chart

A pie chart of cloud spend is the slide every FinOps review starts with. It shows which categories are worth optimizing and which are noise, and because it is text, it can be regenerated from a billing export each month without opening a design tool.

  • mermaid pie chart
  • cloud cost breakdown chart
  • finops pie chart
  • pie chart in markdown
  • spend by category
Cloud Cost Breakdown as a Mermaid Pie Chart42%21%11%9%9%8%Monthly cloud spend by categoryCompute [42]Managed databases [21]Object storage [11]Network egress [9]Observability [8]Other services [9]
Open in editor → 8 linesrenders in GitHub, Notion, Obsidian

Mermaid code

pie showData
    title Monthly cloud spend by category
    "Compute" : 42
    "Managed databases" : 21
    "Object storage" : 11
    "Network egress" : 9
    "Observability" : 8
    "Other services" : 9

Paste this into any tool that renders Mermaid, or into the editor to change the theme and export PNG or SVG. Syntax reference: Pie Chart guide.

What this diagram shows

Six slices add up to 100. Compute at 42 percent and Managed databases at 21 percent are two thirds of the bill, so those are where a reserved-capacity discussion starts. The showData keyword after pie prints each value next to its legend entry, which saves readers from estimating angles. Slice order in the chart follows the order in the source.

Pie charts work when there are six or fewer categories and the message is proportion. For a trend over months, use an XY chart instead.

How to adapt it

  • Replace the six values with the percentages or raw amounts from your billing export; Mermaid normalizes them, so they do not have to sum to 100.
  • Rename slices to match your provider's service categories, or group by team or environment instead of by service.
  • Remove showData if the chart appears in a slide where the legend values would be too small to read.
  • Keep rare services inside Other services rather than adding slices under 3 percent, which render as unreadable slivers.

FAQ

Do the values have to be percentages?

No. Any positive numbers work; Mermaid computes each slice as its share of the total. You can paste dollar amounts directly and the chart stays correct.

Can I control the slice colors?

Yes, through theme variables pie1 through pie12 in an init directive, for example %%{init: {"themeVariables": {"pie1": "#4f46e5"}}}%%. Colors are assigned in source order.