Chart Compiler Gallery
ChartSpec data compiles into resolved scales, layer specs, glyph definitions, scene graph nodes, and a single SVG renderer.
Density Plot
Rebuilds the density plot with a density transform and filled path mark.
Data Sources
6
Fields
8
Scales
2
Layers
8
Glyphs
24
rect 2 / line 12 / text 9 / path 1
Build Path
This example is rebuilt from gallery data source observations by recipe densityPlot: 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.densityPlot",
"data": [
{
"id": "source_gallery_densityplot",
"rows": 24
},
{
"id": "source_density",
"rows": 48
},
{
"id": "__guide.pipeline_xgrid_guide",
"rows": 3
},
{
"id": "__guide.pipeline_ygrid_guide",
"rows": 6
},
{
"id": "__guide.pipeline_xaxis_guide",
"rows": 3
},
{
"id": "__guide.pipeline_yaxis_guide",
"rows": 6
}
],
"transforms": [
{
"id": "pipeline_density_rows_transform",
"type": "density",
"input": "source_gallery_densityplot",
"output": "source_density",
"options": {
"count": 48,
"errorMethod": "standardError",
"field": "value",
"fit": "contain",
"includeMax": true,
"layoutKind": "",
"layoutMode": "proportionalAngle",
"mode": "normal",
"order": []
}
}
],
"axes": [
{
"id": "pipeline_xaxis_guide",
"scale": "pipeline_value_x_x_scale",
"orientation": "bottom"
},
{
"id": "pipeline_yaxis_guide",
"scale": "pipeline_density_y_y_scale",
"orientation": "left"
}
],
"grids": [
{
"id": "pipeline_xgrid_guide",
"scale": "pipeline_value_x_x_scale",
"orientation": "x"
},
{
"id": "pipeline_ygrid_guide",
"scale": "pipeline_density_y_y_scale",
"orientation": "y"
}
],
"legends": [],
"fields": [
"__rowLabel",
"id",
"value",
"bandwidth",
"count",
"density",
"tooltip",
"label"
],
"scales": [
{
"id": "pipeline_value_x_x_scale",
"type": "linear",
"domain": {
"source": "field",
"data": "source_density",
"field": "value",
"fields": [],
"includeZero": false,
"order": "input",
"reverse": false,
"symmetric": false
}
},
{
"id": "pipeline_density_y_y_scale",
"type": "linear",
"domain": {
"source": "field",
"data": "source_density",
"field": "density",
"fields": [],
"includeZero": true,
"order": "input",
"reverse": false,
"symmetric": false
}
}
],
"layers": [
{
"id": "pipeline_xgrid_guide",
"mark": "line",
"role": "guide"
},
{
"id": "pipeline_ygrid_guide",
"mark": "line",
"role": "guide"
},
{
"id": "pipeline_xaxis_guide-tick-marks",
"mark": "line",
"role": "guide"
},
{
"id": "pipeline_xaxis_guide-labels",
"mark": "text",
"role": "guide"
},
{
"id": "pipeline_yaxis_guide-labels",
"mark": "text",
"role": "guide"
},
{
"id": "create_chart_surface",
"mark": "rect",
"role": "context"
},
{
"id": "pipeline_value_density_panel_layout_surface",
"mark": "rect",
"role": "context"
},
{
"id": "pipeline_value_density_area_layer",
"mark": "path",
"role": "data",
"path": {
"directD": false,
"areaBand": false,
"closedToY": true,
"curve": "linear",
"sortBy": "value"
}
}
]
}Resolved SceneGraph
{
"scene": "gallery.densityPlot.scene",
"scales": [
{
"id": "pipeline_value_x_x_scale",
"type": "linear",
"domain": [
10,
70
],
"range": [
70,
830
],
"ticks": [
20,
40,
60
]
},
{
"id": "pipeline_density_y_y_scale",
"type": "linear",
"domain": [
0,
0.025
],
"range": [
400,
70
],
"ticks": [
0,
0.005,
0.01,
0.015,
0.02,
0.025
]
}
],
"layers": [
{
"id": "create_chart_surface",
"role": "context",
"zIndex": -10,
"glyphs": 1
},
{
"id": "pipeline_xgrid_guide",
"role": "guide",
"zIndex": 0,
"glyphs": 3
},
{
"id": "pipeline_ygrid_guide",
"role": "guide",
"zIndex": 0,
"glyphs": 6
},
{
"id": "pipeline_value_density_panel_layout_surface",
"role": "context",
"zIndex": 0,
"glyphs": 1
},
{
"id": "pipeline_xaxis_guide-tick-marks",
"role": "guide",
"zIndex": 5,
"glyphs": 3
},
{
"id": "pipeline_xaxis_guide-labels",
"role": "guide",
"zIndex": 20,
"glyphs": 3
},
{
"id": "pipeline_yaxis_guide-labels",
"role": "guide",
"zIndex": 20,
"glyphs": 6
},
{
"id": "pipeline_value_density_area_layer",
"role": "data",
"zIndex": 20,
"glyphs": 1
}
]
}Glyph Data Tree
Full parameter lineage for the active compiler surface.
create_chart_surface
pipeline_xgrid_guide
pipeline_ygrid_guide
pipeline_value_density_panel_layout_surface
pipeline_xaxis_guide-tick-marks
pipeline_xaxis_guide-labels
pipeline_yaxis_guide-labels
pipeline_value_density_area_layer
Glyph Inspector
Select a glyph in the chart to inspect resolved params and lineage.