Chart Compiler Gallery
ChartSpec data compiles into resolved scales, layer specs, glyph definitions, scene graph nodes, and a single SVG renderer.
Density Plot
The density transform estimates a distribution curve from raw values, then a filled path renders the catalogue density shape.
Data Sources
6
Fields
6
Scales
2
Layers
8
Glyphs
31
line 19 / path 1 / text 11
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
Raw observations
ChartSpec
{
"id": "catalogue.density",
"data": [
{
"id": "observations",
"rows": 24
},
{
"id": "density",
"rows": 48
},
{
"id": "__guide.x-grid",
"rows": 6
},
{
"id": "__guide.y-grid",
"rows": 5
},
{
"id": "__guide.x",
"rows": 6
},
{
"id": "__guide.y",
"rows": 5
}
],
"transforms": [
{
"id": "observation-density",
"type": "density",
"input": "observations",
"output": "density",
"options": {
"value": "value",
"count": 48,
"start": 15,
"end": 72
}
}
],
"axes": [
{
"id": "x",
"scale": "x",
"orientation": "bottom"
},
{
"id": "y",
"scale": "y",
"orientation": "left"
}
],
"grids": [
{
"id": "x-grid",
"scale": "x",
"orientation": "x"
},
{
"id": "y-grid",
"scale": "y",
"orientation": "y"
}
],
"fields": [
"value",
"density",
"bandwidth",
"tooltip",
"count",
"label"
],
"scales": [
{
"id": "x",
"type": "linear",
"domain": {
"source": "field",
"data": "density",
"field": "value",
"padding": 0.04
}
},
{
"id": "y",
"type": "linear",
"domain": {
"source": "field",
"data": "density",
"field": "density",
"includeZero": true,
"padding": 0.08
}
}
],
"layers": [
{
"id": "x-grid",
"mark": "line",
"role": "guide"
},
{
"id": "y-grid",
"mark": "line",
"role": "guide"
},
{
"id": "x-axis",
"mark": "line",
"role": "guide"
},
{
"id": "x-tick-marks",
"mark": "line",
"role": "guide"
},
{
"id": "x-labels",
"mark": "text",
"role": "guide"
},
{
"id": "y-axis",
"mark": "line",
"role": "guide"
},
{
"id": "y-labels",
"mark": "text",
"role": "guide"
},
{
"id": "density-area",
"mark": "path",
"role": "data",
"path": {
"directD": false,
"areaBand": false,
"closedToY": true,
"curve": "smooth",
"sortBy": "value"
}
}
]
}Resolved SceneGraph
{
"scene": "catalogue.density.scene",
"scales": [
{
"id": "x",
"type": "linear",
"domain": [
10,
80
],
"range": [
58,
686
],
"ticks": [
10,
24,
38,
52,
66,
80
]
},
{
"id": "y",
"type": "linear",
"domain": [
-0.005,
0.025
],
"range": [
284,
24
],
"ticks": [
-0.005,
0.0025000000000000005,
0.010000000000000002,
0.0175,
0.025
]
}
],
"layers": [
{
"id": "x-grid",
"role": "guide",
"zIndex": 0,
"glyphs": 6
},
{
"id": "y-grid",
"role": "guide",
"zIndex": 0,
"glyphs": 5
},
{
"id": "x-axis",
"role": "guide",
"zIndex": 0,
"glyphs": 1
},
{
"id": "y-axis",
"role": "guide",
"zIndex": 0,
"glyphs": 1
},
{
"id": "x-tick-marks",
"role": "guide",
"zIndex": 5,
"glyphs": 6
},
{
"id": "density-area",
"role": "data",
"zIndex": 10,
"glyphs": 1
},
{
"id": "x-labels",
"role": "guide",
"zIndex": 20,
"glyphs": 6
},
{
"id": "y-labels",
"role": "guide",
"zIndex": 20,
"glyphs": 5
}
]
}Glyph Data Tree
Full parameter lineage for the active compiler surface.
x-grid
y-grid
x-axis
y-axis
x-tick-marks
density-area
x-labels
y-labels
Glyph Inspector
Select a glyph in the chart to inspect resolved params and lineage.