Category Revenue Treemap

Raw category revenue rows become tile geometry, then rect and label glyphs preserve that lineage.

Treemap

Data Sources

2

Fields

14

Scales

1

Layers

3

Glyphs

18

rect 6 / text 12

Apparel: 146 (26.59%)Home: 91 (16.58%)Beauty: 74 (13.48%)Electronics: 118 (21.49%)Outdoor: 62 (11.29%)Grocery: 58 (10.56%)ApparelHomeBeautyElectronicsOutdoorGrocery14691741186258

Data Flow Diagram

0/173 nodes
0/296 edges
173 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

Category metrics

category-metrics
raw
5 columns
feeds treemap-tile-layout

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

3 layers

Full parameter lineage for the active compiler surface.

tiles

6

tile-labels

6

tile-values

6

Glyph Inspector

none

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