Chart Compiler Gallery
ChartSpec data compiles into resolved scales, layer specs, glyph definitions, scene graph nodes, and a single SVG renderer.
Treemap
Rebuilds the catalogue treemap with generated tile geometry and direct text labels.
Data Sources
2
Fields
16
Scales
1
Layers
5
Glyphs
20
rect 8 / text 12
Build Path
This example is rebuilt from gallery data source category-metrics by recipe treemap: 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.treemap",
"data": [
{
"id": "source_gallery_treemap",
"rows": 6
},
{
"id": "source_tiles",
"rows": 6
}
],
"transforms": [
{
"id": "pipeline_treemap_tiles_transform",
"type": "treemap",
"input": "source_gallery_treemap",
"output": "source_tiles",
"options": {
"count": 1,
"errorMethod": "standardError",
"fit": "contain",
"includeMax": true,
"labelField": "category",
"layout": "pipeline_revenue_treemap_panel_layout",
"layoutKind": "",
"layoutMode": "proportionalAngle",
"mode": "normal",
"order": [],
"paddingInner": 4,
"value": "revenue"
}
}
],
"axes": [],
"grids": [],
"legends": [],
"fields": [
"__rowLabel",
"id",
"category",
"revenue",
"margin",
"formatted",
"height",
"labelX",
"labelY",
"share",
"tooltip",
"value",
"valueY",
"width",
"x",
"y"
],
"scales": [
{
"id": "pipeline_category_color_color_scale",
"type": "ordinal",
"domain": {
"source": "field",
"data": "source_tiles",
"field": "category",
"fields": [],
"includeZero": false,
"order": "input",
"reverse": false,
"symmetric": false
}
}
],
"layers": [
{
"id": "create_chart_surface",
"mark": "rect",
"role": "context"
},
{
"id": "pipeline_revenue_treemap_panel_layout_surface",
"mark": "rect",
"role": "context"
},
{
"id": "pipeline_revenue_treemap_tiles_layer",
"mark": "rect",
"role": "data"
},
{
"id": "pipeline_revenue_treemap_labels_layer",
"mark": "text",
"role": "guide"
},
{
"id": "pipeline_revenue_treemap_values_layer",
"mark": "text",
"role": "guide"
}
]
}Resolved SceneGraph
{
"scene": "gallery.treemap.scene",
"scales": [
{
"id": "pipeline_category_color_color_scale",
"type": "ordinal",
"domain": [
"Apparel",
"Home",
"Beauty",
"Electronics",
"Outdoor",
"Grocery"
],
"range": [
"var(--colors-blue-9)",
"var(--colors-green-9)",
"var(--colors-orange-9)",
"var(--colors-purple-9)"
]
}
],
"layers": [
{
"id": "create_chart_surface",
"role": "context",
"zIndex": -10,
"glyphs": 1
},
{
"id": "pipeline_revenue_treemap_panel_layout_surface",
"role": "context",
"zIndex": 0,
"glyphs": 1
},
{
"id": "pipeline_revenue_treemap_tiles_layer",
"role": "data",
"zIndex": 20,
"glyphs": 6
},
{
"id": "pipeline_revenue_treemap_labels_layer",
"role": "guide",
"zIndex": 20,
"glyphs": 6
},
{
"id": "pipeline_revenue_treemap_values_layer",
"role": "guide",
"zIndex": 20,
"glyphs": 6
}
]
}Glyph Data Tree
Full parameter lineage for the active compiler surface.
create_chart_surface
pipeline_revenue_treemap_panel_layout_surface
pipeline_revenue_treemap_tiles_layer
pipeline_revenue_treemap_labels_layer
pipeline_revenue_treemap_values_layer
Glyph Inspector
Select a glyph in the chart to inspect resolved params and lineage.