Treemap

Rebuilds the catalogue treemap with generated tile geometry and direct text labels.

Treemap
Gallery Treemap Pipeline pipeline

Data Sources

2

Fields

16

Scales

1

Layers

5

Glyphs

20

rect 8 / text 12

ApparelHomeBeautyElectronicsOutdoorGroceryApparelApparelHomeHomeBeautyBeautyElectronicsElectronicsOutdoorOutdoorGroceryGrocery1461469191747411811862625858

Build Path

Gallery Treemap Pipeline

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

6 pipelines
7 nodes
5 edges

Data Flow Diagram

0/264 nodes
0/464 edges
264 hidden

Select a glyph to highlight its complete source path.

Scope

Roles

source
transform
field
scale
layer
param
glyph

No matching flow nodes

Adjust search, scope, or role filters.

Available Data

2 tables
1 transforms

Imported table

source_gallery_treemap
raw
6 columns
feeds pipeline_treemap_tiles_transform

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

5 layers

Full parameter lineage for the active compiler surface.

create_chart_surface

1

pipeline_revenue_treemap_panel_layout_surface

1

pipeline_revenue_treemap_tiles_layer

6

pipeline_revenue_treemap_labels_layer

6

pipeline_revenue_treemap_values_layer

6

Glyph Inspector

none

Select a glyph in the chart to inspect resolved params and lineage.