Chart Compiler Gallery
ChartSpec data compiles into resolved scales, layer specs, glyph definitions, scene graph nodes, and a single SVG renderer.
Bar Chart
Discrete categories compile to rect bars, text labels, and a quantitative value scale.
Data Sources
4
Fields
4
Scales
2
Layers
7
Glyphs
105
line 38 / rect 31 / text 36
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
Category values
ChartSpec
{
"id": "gallery.bar",
"data": [
{
"id": "bars",
"rows": 31
},
{
"id": "__guide.y-grid",
"rows": 5
},
{
"id": "__guide.x",
"rows": 31
},
{
"id": "__guide.y",
"rows": 5
}
],
"transforms": [],
"axes": [
{
"id": "x",
"scale": "x",
"orientation": "bottom"
},
{
"id": "y",
"scale": "y",
"orientation": "left"
}
],
"grids": [
{
"id": "y-grid",
"scale": "y",
"orientation": "y"
}
],
"fields": [
"label",
"value",
"formatted",
"tooltip"
],
"scales": [
{
"id": "x",
"type": "band",
"domain": {
"source": "field",
"data": "bars",
"field": "label"
}
},
{
"id": "y",
"type": "linear",
"domain": {
"source": "values",
"values": [
0,
20
],
"includeZero": true
}
}
],
"layers": [
{
"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": "bars",
"mark": "rect",
"role": "data"
}
]
}Resolved SceneGraph
{
"scene": "gallery.bar.scene",
"scales": [
{
"id": "x",
"type": "band",
"domain": [
"1",
"2",
"3",
"4",
"5",
"6",
"7",
"8",
"9",
"10",
"11",
"12",
"13",
"14",
"15",
"16",
"17",
"18",
"19",
"20",
"21",
"22",
"23",
"24",
"25",
"26",
"27",
"28",
"29",
"30",
"31"
],
"range": [
58,
696
],
"bandwidth": 15.7020725388601
},
{
"id": "y",
"type": "linear",
"domain": [
0,
20
],
"range": [
286,
22
],
"ticks": [
0,
5,
10,
15,
20
]
}
],
"layers": [
{
"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": 31
},
{
"id": "bars",
"role": "data",
"zIndex": 10,
"glyphs": 31
},
{
"id": "x-labels",
"role": "guide",
"zIndex": 20,
"glyphs": 31
},
{
"id": "y-labels",
"role": "guide",
"zIndex": 20,
"glyphs": 5
}
]
}Glyph Data Tree
Full parameter lineage for the active compiler surface.
y-grid
x-axis
y-axis
x-tick-marks
bars
x-labels
y-labels
Glyph Inspector
Select a glyph in the chart to inspect resolved params and lineage.