Chart Compiler Gallery
ChartSpec data compiles into resolved scales, layer specs, glyph definitions, scene graph nodes, and a single SVG renderer.
Circle Packing
A parent-child metric table compiles into nested circle positions and radii.
Data Sources
3
Fields
23
Scales
1
Layers
5
Glyphs
23
rect 3 / point 10 / text 10
Build Path
This example is rebuilt from gallery data source hierarchy-rows by recipe circlePacking: raw table rows -> TabularSource -> pipeline drafts -> analyzeAuthoringDrafts() -> materialized ChartSpec -> compileChart() -> SceneGraph -> SVG. The graph below shows the authored pipeline stage.
Pipeline recipe graph
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
Imported table
ChartSpec
{
"id": "gallery.circlePacking",
"data": [
{
"id": "source_gallery_circlepacking",
"rows": 10
},
{
"id": "source_hierarchy",
"rows": 10
},
{
"id": "source_circles",
"rows": 10
}
],
"transforms": [
{
"id": "pipeline_circle_hierarchy_transform",
"type": "hierarchy",
"input": "source_gallery_circlepacking",
"output": "source_hierarchy",
"options": {
"endField": "label",
"errorMethod": "standardError",
"field": "node",
"fit": "contain",
"geometryField": "node",
"groupBy": [
"node"
],
"idField": "node",
"includeMax": false,
"labelField": "label",
"layoutKind": "",
"layoutMode": "proportionalAngle",
"mode": "normal",
"order": [],
"orderField": "node",
"parentField": "parent",
"seriesBy": "parent",
"sourceField": "node",
"startField": "parent",
"targetField": "parent",
"value": "value",
"xField": "parent",
"yField": "label"
}
},
{
"id": "pipeline_circle_pack_layout_transform",
"type": "layout",
"input": "source_hierarchy",
"output": "source_circles",
"options": {
"errorMethod": "standardError",
"fit": "contain",
"includeMax": false,
"layout": "pipeline_plot_layout",
"layoutKind": "circlePack",
"layoutMode": "proportionalAngle",
"mode": "normal",
"order": []
}
}
],
"axes": [],
"grids": [],
"legends": [],
"fields": [
"__rowLabel",
"id",
"node",
"parent",
"label",
"value",
"aggregateValue",
"childCount",
"depth",
"formatted",
"isLeaf",
"order",
"parentId",
"pathLabel",
"rootId",
"tooltip",
"cx",
"cy",
"displayLabel",
"labelOpacity",
"labelX",
"labelY",
"r"
],
"scales": [
{
"id": "pipeline_depthcolor_color_scale",
"type": "ordinal",
"domain": {
"source": "field",
"data": "source_circles",
"field": "depth",
"fields": [],
"includeZero": false,
"order": "input",
"reverse": false,
"symmetric": false
}
}
],
"layers": [
{
"id": "create_chart_surface",
"mark": "rect",
"role": "context"
},
{
"id": "pipeline_view_layout_surface",
"mark": "rect",
"role": "context"
},
{
"id": "pipeline_plot_layout_surface",
"mark": "rect",
"role": "context"
},
{
"id": "pipeline_packed_circles_layer",
"mark": "point",
"role": "data"
},
{
"id": "pipeline_circle_labels_layer",
"mark": "text",
"role": "guide"
}
]
}Resolved SceneGraph
{
"scene": "gallery.circlePacking.scene",
"scales": [
{
"id": "pipeline_depthcolor_color_scale",
"type": "ordinal",
"domain": [
0,
1,
2
],
"range": [
"var(--colors-blue-9)",
"var(--colors-green-9)",
"var(--colors-amber-9)",
"var(--colors-purple-9)",
"var(--colors-red-9)"
]
}
],
"layers": [
{
"id": "create_chart_surface",
"role": "context",
"zIndex": -10,
"glyphs": 1
},
{
"id": "pipeline_view_layout_surface",
"role": "context",
"zIndex": 0,
"glyphs": 1
},
{
"id": "pipeline_plot_layout_surface",
"role": "context",
"zIndex": 0,
"glyphs": 1
},
{
"id": "pipeline_packed_circles_layer",
"role": "data",
"zIndex": 10,
"glyphs": 10
},
{
"id": "pipeline_circle_labels_layer",
"role": "guide",
"zIndex": 20,
"glyphs": 10
}
]
}Glyph Data Tree
Full parameter lineage for the active compiler surface.
create_chart_surface
pipeline_view_layout_surface
pipeline_plot_layout_surface
pipeline_packed_circles_layer
pipeline_circle_labels_layer
Glyph Inspector
Select a glyph in the chart to inspect resolved params and lineage.