Pie chart of 2025 revenue by product line, in thousands of dollars. product line, revenue: Subscriptions 2140, Services 860, Hardware 520, Training 180. Title: Revenue by product line, 2025 (total $3.7m).
Forma Visuals · Chart your data · Examples
Revenue by product line pie chart
The share each product line brings in, for the one slide where the mix is the point.
For analysts · Vega-Lite
Try it in the consoleOpen the Vega-Lite editor
The playground allows illustrative values: any number your request does not give, Forma writes, and the answer says generated. Over the API and MCP, that request is refused unless it sets allow_generated_data.
01 The chart
Drawn from the code that came back.
valid · chart@cb3749b2 · 1 credit · 2026-10-07
Sent with the API's default setting, under which a chart is drawn only from values the request gives.
02 The request
In plain words, with its values.
03 What came back
A Vega-Lite spec.
Indented for reading.
{
"$schema": "https://vega.github.io/schema/vega-lite/v6.json",
"name": "revenue_pie",
"data": {
"values": [
{
"product": "Subscriptions",
"revenue": 2140
},
{
"product": "Services",
"revenue": 860
},
{
"product": "Hardware",
"revenue": 520
},
{
"product": "Training",
"revenue": 180
}
]
},
"title": "Revenue by product line, 2025 (total $3.7m)",
"mark": "arc",
"encoding": {
"theta": {
"field": "revenue",
"type": "quantitative",
"aggregate": "sum"
},
"color": {
"field": "product",
"type": "nominal",
"sort": null
}
}
}04 When to use it
Where this chart helps.
- Parts of one whole, with few parts: four or five slices at most.
- A pie shows share, not size; to compare lines across years, a stacked bar reads better.
- Say the total in the title, since a pie does not show it.