Chart Compiler Gallery
ChartSpec data compiles into resolved scales, layer specs, glyph definitions, scene graph nodes, and a single SVG renderer.
Proportional Area Chart
Rebuilds the proportional-area chart with generated center rows, a band scale, a sqrt size scale, labels, and size legend.
Data Sources
5
Fields
17
Scales
2
Layers
11
Glyphs
31
rect 3 / text 15 / line 5 / point 8
Build Path
This example is rebuilt from gallery data source areas by recipe proportionalAreaChart: 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.proportionalAreaChart",
"data": [
{
"id": "source_gallery_proportionalareachart",
"rows": 5
},
{
"id": "pipeline_centered_area_rows_source",
"rows": 5
},
{
"id": "__guide.pipeline_xaxis_guide",
"rows": 5
},
{
"id": "__guide.pipeline_sizelegend_guide",
"rows": 3
},
{
"id": "__guide.pipeline_sizelegend_guide.title",
"rows": 1
}
],
"transforms": [],
"axes": [
{
"id": "pipeline_xaxis_guide",
"scale": "pipeline_category_x_x_scale",
"orientation": "bottom"
}
],
"grids": [],
"legends": [
{
"id": "pipeline_sizelegend_guide",
"scale": "pipeline_value_size_size_scale",
"kind": "size",
"title": "Relative size",
"values": [
25,
60,
100
]
}
],
"fields": [
"__rowLabel",
"category",
"value",
"formatted",
"tooltip",
"id",
"__rowId",
"centerX",
"centerY",
"label",
"x",
"y",
"symbolX",
"symbolY",
"labelX",
"labelY",
"text"
],
"scales": [
{
"id": "pipeline_category_x_x_scale",
"type": "band",
"domain": {
"source": "field",
"data": "pipeline_centered_area_rows_source",
"field": "category",
"fields": [],
"includeZero": false,
"order": "input",
"reverse": false,
"symmetric": false
}
},
{
"id": "pipeline_value_size_size_scale",
"type": "sqrt",
"domain": {
"source": "field",
"data": "pipeline_centered_area_rows_source",
"field": "value",
"fields": [],
"includeZero": true,
"order": "input",
"reverse": false,
"symmetric": false
}
}
],
"layers": [
{
"id": "pipeline_xaxis_guide-tick-marks",
"mark": "line",
"role": "guide"
},
{
"id": "pipeline_xaxis_guide-labels",
"mark": "text",
"role": "guide"
},
{
"id": "pipeline_sizelegend_guide-symbols",
"mark": "point",
"role": "guide"
},
{
"id": "pipeline_sizelegend_guide-labels",
"mark": "text",
"role": "guide"
},
{
"id": "pipeline_sizelegend_guide-title",
"mark": "text",
"role": "guide"
},
{
"id": "create_chart_surface",
"mark": "rect",
"role": "context"
},
{
"id": "pipeline_value_proportional_areas_panel_layout_surface",
"mark": "rect",
"role": "context"
},
{
"id": "pipeline_value_proportional_areas_panel_layout_frame",
"mark": "rect",
"role": "guide"
},
{
"id": "pipeline_value_proportional_areas_panel_layout_label",
"mark": "text",
"role": "guide"
},
{
"id": "pipeline_value_proportional_areas_circles_layer",
"mark": "point",
"role": "data"
},
{
"id": "pipeline_value_proportional_areas_values_layer",
"mark": "text",
"role": "data"
}
]
}Resolved SceneGraph
{
"scene": "gallery.proportionalAreaChart.scene",
"scales": [
{
"id": "pipeline_category_x_x_scale",
"type": "band",
"domain": [
"Core",
"Growth",
"Seasonal",
"Premium",
"Wholesale"
],
"range": [
50,
616
],
"bandwidth": 84.10441767068272
},
{
"id": "pipeline_value_size_size_scale",
"type": "sqrt",
"domain": [
0,
100
],
"range": [
10,
44
],
"ticks": [
0,
20,
40,
60,
80,
100
]
}
],
"layers": [
{
"id": "create_chart_surface",
"role": "context",
"zIndex": -10,
"glyphs": 1
},
{
"id": "pipeline_value_proportional_areas_panel_layout_surface",
"role": "context",
"zIndex": 0,
"glyphs": 1
},
{
"id": "pipeline_value_proportional_areas_panel_layout_frame",
"role": "guide",
"zIndex": 1,
"glyphs": 1
},
{
"id": "pipeline_value_proportional_areas_panel_layout_label",
"role": "guide",
"zIndex": 2,
"glyphs": 1
},
{
"id": "pipeline_xaxis_guide-tick-marks",
"role": "guide",
"zIndex": 5,
"glyphs": 5
},
{
"id": "pipeline_xaxis_guide-labels",
"role": "guide",
"zIndex": 20,
"glyphs": 5
},
{
"id": "pipeline_value_proportional_areas_circles_layer",
"role": "data",
"zIndex": 20,
"glyphs": 5
},
{
"id": "pipeline_value_proportional_areas_values_layer",
"role": "data",
"zIndex": 20,
"glyphs": 5
},
{
"id": "pipeline_sizelegend_guide-symbols",
"role": "guide",
"zIndex": 40,
"glyphs": 3
},
{
"id": "pipeline_sizelegend_guide-labels",
"role": "guide",
"zIndex": 41,
"glyphs": 3
},
{
"id": "pipeline_sizelegend_guide-title",
"role": "guide",
"zIndex": 42,
"glyphs": 1
}
]
}Glyph Data Tree
Full parameter lineage for the active compiler surface.
create_chart_surface
pipeline_value_proportional_areas_panel_layout_surface
pipeline_value_proportional_areas_panel_layout_frame
pipeline_value_proportional_areas_panel_layout_label
pipeline_xaxis_guide-tick-marks
pipeline_xaxis_guide-labels
pipeline_value_proportional_areas_circles_layer
pipeline_value_proportional_areas_values_layer
pipeline_sizelegend_guide-symbols
pipeline_sizelegend_guide-labels
pipeline_sizelegend_guide-title
Glyph Inspector
Select a glyph in the chart to inspect resolved params and lineage.