Chart Compiler Gallery
ChartSpec data compiles into resolved scales, layer specs, glyph definitions, scene graph nodes, and a single SVG renderer.
Pie Chart
Proportional category shares derive sector paths, labels, and a color legend from raw rows.
Data Sources
4
Fields
20
Scales
1
Layers
5
Glyphs
21
path 5 / text 11 / 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
Channel share
ChartSpec
{
"id": "catalogue.pie-chart",
"data": [
{
"id": "channel-share",
"rows": 5
},
{
"id": "sectors",
"rows": 5
},
{
"id": "__guide.channel-legend",
"rows": 5
},
{
"id": "__guide.channel-legend.title",
"rows": 1
}
],
"transforms": [
{
"id": "pie-sector-layout",
"type": "layout",
"input": "channel-share",
"output": "sectors",
"options": {
"labelField": "channel",
"layout": "plot",
"layoutKind": "polarSectors",
"outerRadius": 138,
"paddingInner": 1.2,
"value": "value"
}
}
],
"legends": [
{
"id": "channel-legend",
"scale": "color",
"kind": "color",
"title": "Channel"
}
],
"fields": [
"channel",
"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": "channel"
}
}
],
"layers": [
{
"id": "channel-legend-swatches",
"mark": "rect",
"role": "guide"
},
{
"id": "channel-legend-labels",
"mark": "text",
"role": "guide"
},
{
"id": "channel-legend-title",
"mark": "text",
"role": "guide"
},
{
"id": "pie-sectors",
"mark": "path",
"role": "data",
"path": {
"directD": true,
"areaBand": false,
"closedToY": false,
"curve": "linear",
"groupBy": [
"id"
]
}
},
{
"id": "sector-labels",
"mark": "text",
"role": "guide"
}
]
}Resolved SceneGraph
{
"scene": "catalogue.pie-chart.scene",
"scales": [
{
"id": "color",
"type": "ordinal",
"domain": [
"Search",
"Direct",
"Social",
"Email",
"Referral"
],
"range": [
"var(--colors-blue-9)",
"var(--colors-green-9)",
"var(--colors-amber-9)",
"var(--colors-purple-9)",
"var(--colors-red-9)"
]
}
],
"layers": [
{
"id": "pie-sectors",
"role": "data",
"zIndex": 10,
"glyphs": 5
},
{
"id": "sector-labels",
"role": "guide",
"zIndex": 20,
"glyphs": 5
},
{
"id": "channel-legend-swatches",
"role": "guide",
"zIndex": 30,
"glyphs": 5
},
{
"id": "channel-legend-labels",
"role": "guide",
"zIndex": 31,
"glyphs": 5
},
{
"id": "channel-legend-title",
"role": "guide",
"zIndex": 32,
"glyphs": 1
}
]
}Glyph Data Tree
Full parameter lineage for the active compiler surface.
pie-sectors
sector-labels
channel-legend-swatches
channel-legend-labels
channel-legend-title
Glyph Inspector
Select a glyph in the chart to inspect resolved params and lineage.