Chart Compiler Gallery
ChartSpec data compiles into resolved scales, layer specs, glyph definitions, scene graph nodes, and a single SVG renderer.
FD Best Decade
FlowingData-linked YouGov chart reproduced as respondent-age small multiples with source-row provenance.
Data Sources
5
Fields
42
Scales
1
Layers
10
Glyphs
330
rect 80 / text 243 / line 7
Build Path
This example is rebuilt from gallery data source raw-area-series by recipe stackedAreaGraph: 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.stackedAreaGraph",
"data": [
{
"id": "source_gallery_stackedareagraph",
"rows": 77
},
{
"id": "pipeline_source_metadata_source",
"rows": 1
},
{
"id": "pipeline_title_and_source_notes_source",
"rows": 5
},
{
"id": "source_respondent_panels",
"rows": 7
},
{
"id": "source_response_bars",
"rows": 77
}
],
"transforms": [
{
"id": "pipeline_respondent_panel_layout_transform",
"type": "layout",
"input": "source_gallery_stackedareagraph",
"output": "source_respondent_panels",
"options": {
"columnGap": 18,
"columns": 7,
"errorMethod": "standardError",
"field": "period",
"fit": "contain",
"geometryField": "period",
"groupBy": [
"period"
],
"idField": "period",
"includeMax": false,
"labelField": "period",
"layout": "pipeline_plot_layout",
"layoutKind": "facetPanels",
"layoutMode": "proportionalAngle",
"mode": "normal",
"order": [
"U.S. adult citizens",
"20 to 29-year-olds",
"30 to 39-year-olds",
"40 to 49-year-olds",
"50 to 59-year-olds",
"60 to 69-year-olds",
"70 to 79-year-olds"
],
"orderField": "period",
"panelHeaderHeight": 38,
"sourceField": "period",
"value": "period"
}
},
{
"id": "pipeline_response_bar_layout_transform",
"type": "layout",
"input": "source_gallery_stackedareagraph",
"output": "source_response_bars",
"options": {
"columnGap": 18,
"columns": 7,
"endField": "seriesindex",
"errorMethod": "standardError",
"field": "period",
"fit": "contain",
"geometryField": "period",
"groupBy": [
"period"
],
"idField": "period",
"includeMax": false,
"labelField": "period",
"layout": "pipeline_plot_layout",
"layoutKind": "facetPoints",
"layoutMode": "proportionalAngle",
"mode": "normal",
"order": [
"U.S. adult citizens",
"20 to 29-year-olds",
"30 to 39-year-olds",
"40 to 49-year-olds",
"50 to 59-year-olds",
"60 to 69-year-olds",
"70 to 79-year-olds"
],
"orderField": "period",
"panelHeaderHeight": 38,
"parentField": "value",
"seriesBy": "value",
"sourceField": "period",
"startField": "value",
"targetField": "value",
"value": "seriesindex",
"xEnd": 35,
"xField": "value",
"xPadding": 0,
"xStart": 0,
"yEnd": 0,
"yField": "seriesindex",
"yPadding": 13,
"yStart": 10
}
}
],
"axes": [],
"grids": [],
"legends": [],
"fields": [
"__rowLabel",
"periodindex",
"valuelabel",
"id",
"period",
"periodshort",
"series",
"seriesindex",
"value",
"insidelabel",
"outsidelabel",
"responselabel",
"tooltip",
"tooltipeyebrow",
"tooltiptitle",
"tooltipbody",
"tooltipaccentcolor",
"articleUrl",
"extractedOn",
"imageUrl",
"sourceDataset",
"surveyPdfUrl",
"youGovArticleUrl",
"fill",
"fontSize",
"fontWeight",
"text",
"x",
"y",
"averageLabel",
"averageY",
"centerX",
"height",
"labelX",
"labelY",
"panelX0",
"panelX1",
"panelY0",
"panelY1",
"plotY0",
"plotY1",
"width"
],
"scales": [
{
"id": "pipeline_color_color_scale",
"type": "ordinal",
"domain": {
"source": "values",
"values": [
"U.S. adult citizens",
"20 to 29-year-olds",
"30 to 39-year-olds",
"40 to 49-year-olds",
"50 to 59-year-olds",
"60 to 69-year-olds",
"70 to 79-year-olds"
],
"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_chart_title_layer",
"mark": "text",
"role": "guide"
},
{
"id": "pipeline_panel_baselines_layer",
"mark": "line",
"role": "guide"
},
{
"id": "pipeline_panel_labels_layer",
"mark": "text",
"role": "guide"
},
{
"id": "pipeline_response_row_labels_layer",
"mark": "text",
"role": "guide"
},
{
"id": "pipeline_best_decade_bars_layer",
"mark": "rect",
"role": "data"
},
{
"id": "pipeline_inside_value_labels_layer",
"mark": "text",
"role": "guide"
},
{
"id": "pipeline_outside_value_labels_layer",
"mark": "text",
"role": "guide"
}
]
}Resolved SceneGraph
{
"scene": "gallery.stackedAreaGraph.scene",
"scales": [
{
"id": "pipeline_color_color_scale",
"type": "ordinal",
"domain": [
"U.S. adult citizens",
"20 to 29-year-olds",
"30 to 39-year-olds",
"40 to 49-year-olds",
"50 to 59-year-olds",
"60 to 69-year-olds",
"70 to 79-year-olds"
],
"range": [
"#c9cfd8",
"#ef553b",
"#8a3ff0",
"#62c7b1",
"#46a8e7",
"#143f98",
"#ef553b"
]
}
],
"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_chart_title_layer",
"role": "guide",
"zIndex": 0,
"glyphs": 5
},
{
"id": "pipeline_panel_baselines_layer",
"role": "guide",
"zIndex": 2,
"glyphs": 7
},
{
"id": "pipeline_panel_labels_layer",
"role": "guide",
"zIndex": 5,
"glyphs": 7
},
{
"id": "pipeline_response_row_labels_layer",
"role": "guide",
"zIndex": 8,
"glyphs": 77
},
{
"id": "pipeline_best_decade_bars_layer",
"role": "data",
"zIndex": 10,
"glyphs": 77
},
{
"id": "pipeline_inside_value_labels_layer",
"role": "guide",
"zIndex": 15,
"glyphs": 77
},
{
"id": "pipeline_outside_value_labels_layer",
"role": "guide",
"zIndex": 15,
"glyphs": 77
}
]
}Glyph Data Tree
Full parameter lineage for the active compiler surface.
create_chart_surface
pipeline_view_layout_surface
pipeline_plot_layout_surface
pipeline_chart_title_layer
pipeline_panel_baselines_layer
pipeline_panel_labels_layer
pipeline_response_row_labels_layer
pipeline_best_decade_bars_layer
pipeline_inside_value_labels_layer
pipeline_outside_value_labels_layer
Glyph Inspector
Select a glyph in the chart to inspect resolved params and lineage.