Chart Compiler Gallery
ChartSpec data compiles into resolved scales, layer specs, glyph definitions, scene graph nodes, and a single SVG renderer.
Category Revenue Treemap
Raw category revenue rows become tile geometry, then rect and label glyphs preserve that lineage.
Data Sources
2
Fields
14
Scales
1
Layers
3
Glyphs
18
rect 6 / text 12
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 metrics
ChartSpec
{
"id": "gallery.treemap",
"data": [
{
"id": "category-metrics",
"rows": 6
},
{
"id": "tiles",
"rows": 6
}
],
"transforms": [
{
"id": "treemap-tile-layout",
"type": "treemap",
"input": "category-metrics",
"output": "tiles",
"options": {
"labelField": "category",
"value": "revenue",
"layout": "plot",
"paddingInner": 10
}
}
],
"fields": [
"category",
"x",
"y",
"width",
"height",
"labelX",
"labelY",
"valueY",
"revenue",
"formatted",
"tooltip",
"margin",
"value",
"share"
],
"scales": [
{
"id": "color",
"type": "ordinal",
"domain": {
"source": "field",
"data": "tiles",
"field": "category"
}
}
],
"layers": [
{
"id": "tiles",
"mark": "rect",
"role": "data"
},
{
"id": "tile-labels",
"mark": "text",
"role": "guide"
},
{
"id": "tile-values",
"mark": "text",
"role": "guide"
}
]
}Resolved SceneGraph
{
"scene": "gallery.treemap.scene",
"scales": [
{
"id": "color",
"type": "ordinal",
"domain": [
"Apparel",
"Home",
"Beauty",
"Electronics",
"Outdoor",
"Grocery"
],
"range": [
"var(--colors-blue-9)",
"var(--colors-green-9)",
"var(--colors-amber-9)",
"var(--colors-purple-9)",
"var(--colors-red-9)"
]
}
],
"layers": [
{
"id": "tiles",
"role": "data",
"zIndex": 10,
"glyphs": 6
},
{
"id": "tile-labels",
"role": "guide",
"zIndex": 20,
"glyphs": 6
},
{
"id": "tile-values",
"role": "guide",
"zIndex": 20,
"glyphs": 6
}
]
}Glyph Data Tree
Full parameter lineage for the active compiler surface.
tiles
tile-labels
tile-values
Glyph Inspector
Select a glyph in the chart to inspect resolved params and lineage.