Chart Compiler Gallery
ChartSpec data compiles into resolved scales, layer specs, glyph definitions, scene graph nodes, and a single SVG renderer.
Donut Chart
Raw regional totals derive annular sector paths with generated legend swatches.
Data Sources
4
Fields
20
Scales
1
Layers
6
Glyphs
22
path 5 / text 12 / rect 5
Data Flow Diagram
Select a glyph to highlight its complete source path.
Scope
Roles
No matching flow nodes
Adjust search, scope, or role filters.
Available Data
Regional sales
ChartSpec
{
"id": "catalogue.donut-chart",
"data": [
{
"id": "regional-sales",
"rows": 5
},
{
"id": "sectors",
"rows": 5
},
{
"id": "__guide.region-legend",
"rows": 5
},
{
"id": "__guide.region-legend.title",
"rows": 1
}
],
"transforms": [
{
"id": "donut-sector-layout",
"type": "layout",
"input": "regional-sales",
"output": "sectors",
"options": {
"innerRadius": 70,
"labelField": "region",
"layout": "plot",
"layoutKind": "polarSectors",
"outerRadius": 138,
"paddingInner": 1.6,
"value": "value"
}
}
],
"legends": [
{
"id": "region-legend",
"scale": "color",
"kind": "color",
"title": "Region"
}
],
"fields": [
"region",
"value",
"share",
"pathD",
"labelX",
"labelY",
"percentLabel",
"tooltip",
"startAngle",
"endAngle",
"midAngle",
"innerRadius",
"outerRadius",
"formatted",
"label",
"x",
"y",
"symbolX",
"symbolY",
"text"
],
"scales": [
{
"id": "color",
"type": "ordinal",
"domain": {
"source": "field",
"data": "sectors",
"field": "region"
}
}
],
"layers": [
{
"id": "region-legend-swatches",
"mark": "rect",
"role": "guide"
},
{
"id": "region-legend-labels",
"mark": "text",
"role": "guide"
},
{
"id": "region-legend-title",
"mark": "text",
"role": "guide"
},
{
"id": "donut-sectors",
"mark": "path",
"role": "data",
"path": {
"directD": true,
"areaBand": false,
"closedToY": false,
"curve": "linear",
"groupBy": [
"id"
]
}
},
{
"id": "donut-total",
"mark": "text",
"role": "guide"
},
{
"id": "sector-labels",
"mark": "text",
"role": "guide"
}
]
}Resolved SceneGraph
{
"scene": "catalogue.donut-chart.scene",
"scales": [
{
"id": "color",
"type": "ordinal",
"domain": [
"North",
"South",
"East",
"West",
"Central"
],
"range": [
"var(--colors-blue-9)",
"var(--colors-green-9)",
"var(--colors-amber-9)",
"var(--colors-purple-9)",
"var(--colors-red-9)"
]
}
],
"layers": [
{
"id": "donut-sectors",
"role": "data",
"zIndex": 10,
"glyphs": 5
},
{
"id": "donut-total",
"role": "guide",
"zIndex": 20,
"glyphs": 1
},
{
"id": "sector-labels",
"role": "guide",
"zIndex": 25,
"glyphs": 5
},
{
"id": "region-legend-swatches",
"role": "guide",
"zIndex": 30,
"glyphs": 5
},
{
"id": "region-legend-labels",
"role": "guide",
"zIndex": 31,
"glyphs": 5
},
{
"id": "region-legend-title",
"role": "guide",
"zIndex": 32,
"glyphs": 1
}
]
}Glyph Data Tree
Full parameter lineage for the active compiler surface.
donut-sectors
donut-total
sector-labels
region-legend-swatches
region-legend-labels
region-legend-title
Glyph Inspector
Select a glyph in the chart to inspect resolved params and lineage.