Stacked Bar Graph

Parent categories split into colored rect segments for part-to-whole comparison.

Stacked Bar Graph

Data Sources

7

Fields

15

Scales

3

Layers

10

Glyphs

40

line 12 / rect 15 / text 13

Spec / Data: 38Spec / Guide: 19Spec / Interaction: 12Scale / Data: 42Scale / Guide: 26Scale / Interaction: 15Glyph / Data: 56Glyph / Guide: 22Glyph / Interaction: 21Scene / Data: 64Scene / Guide: 18Scene / Interaction: 270306090120SpecScaleGlyphSceneDataGuideInteractionRole

Data Flow Diagram

0/390 nodes
0/730 edges
390 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

7 tables
1 transforms

Raw stack checks

raw-stacks
raw
5 columns
feeds stack-segment-geometry

ChartSpec

{
  "id": "gallery.stacked",
  "data": [
    {
      "id": "raw-stacks",
      "rows": 12
    },
    {
      "id": "segments",
      "rows": 12
    },
    {
      "id": "__guide.x-grid",
      "rows": 5
    },
    {
      "id": "__guide.x",
      "rows": 5
    },
    {
      "id": "__guide.y",
      "rows": 4
    },
    {
      "id": "__guide.role-legend",
      "rows": 3
    },
    {
      "id": "__guide.role-legend.title",
      "rows": 1
    }
  ],
  "transforms": [
    {
      "id": "stack-segment-geometry",
      "type": "stack",
      "input": "raw-stacks",
      "output": "segments",
      "options": {
        "order": [
          "Data",
          "Guide",
          "Interaction"
        ]
      }
    }
  ],
  "axes": [
    {
      "id": "x",
      "scale": "x",
      "orientation": "bottom"
    },
    {
      "id": "y",
      "scale": "y",
      "orientation": "left"
    }
  ],
  "grids": [
    {
      "id": "x-grid",
      "scale": "x",
      "orientation": "x"
    }
  ],
  "legends": [
    {
      "id": "role-legend",
      "scale": "color",
      "kind": "color",
      "title": "Role"
    }
  ],
  "fields": [
    "stage",
    "series",
    "start",
    "end",
    "value",
    "tooltip",
    "total",
    "label",
    "x",
    "y",
    "symbolX",
    "symbolY",
    "labelX",
    "labelY",
    "text"
  ],
  "scales": [
    {
      "id": "x",
      "type": "linear",
      "domain": {
        "source": "values",
        "values": [
          0,
          120
        ],
        "includeZero": true
      }
    },
    {
      "id": "y",
      "type": "band",
      "domain": {
        "source": "field",
        "data": "segments",
        "field": "stage"
      }
    },
    {
      "id": "color",
      "type": "ordinal",
      "domain": {
        "source": "field",
        "data": "segments",
        "field": "series"
      }
    }
  ],
  "layers": [
    {
      "id": "x-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": "role-legend-swatches",
      "mark": "rect",
      "role": "guide"
    },
    {
      "id": "role-legend-labels",
      "mark": "text",
      "role": "guide"
    },
    {
      "id": "role-legend-title",
      "mark": "text",
      "role": "guide"
    },
    {
      "id": "segments",
      "mark": "rect",
      "role": "data"
    }
  ]
}

Resolved SceneGraph

{
  "scene": "gallery.stacked.scene",
  "scales": [
    {
      "id": "x",
      "type": "linear",
      "domain": [
        0,
        120
      ],
      "range": [
        104,
        692
      ],
      "ticks": [
        0,
        30,
        60,
        90,
        120
      ]
    },
    {
      "id": "y",
      "type": "band",
      "domain": [
        "Spec",
        "Scale",
        "Glyph",
        "Scene"
      ],
      "range": [
        42,
        280
      ],
      "bandwidth": 42.284263959390856
    },
    {
      "id": "color",
      "type": "ordinal",
      "domain": [
        "Data",
        "Guide",
        "Interaction"
      ],
      "range": [
        "var(--colors-red-9)",
        "var(--colors-orange-8)",
        "var(--colors-amber-8)",
        "var(--colors-amber-6)"
      ]
    }
  ],
  "layers": [
    {
      "id": "x-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": 5
    },
    {
      "id": "segments",
      "role": "data",
      "zIndex": 10,
      "glyphs": 12
    },
    {
      "id": "x-labels",
      "role": "guide",
      "zIndex": 20,
      "glyphs": 5
    },
    {
      "id": "y-labels",
      "role": "guide",
      "zIndex": 20,
      "glyphs": 4
    },
    {
      "id": "role-legend-swatches",
      "role": "guide",
      "zIndex": 30,
      "glyphs": 3
    },
    {
      "id": "role-legend-labels",
      "role": "guide",
      "zIndex": 31,
      "glyphs": 3
    },
    {
      "id": "role-legend-title",
      "role": "guide",
      "zIndex": 32,
      "glyphs": 1
    }
  ]
}

Glyph Data Tree

10 layers

Full parameter lineage for the active compiler surface.

x-grid

5

x-axis

1

y-axis

1

x-tick-marks

5

segments

12

x-labels

5

y-labels

4

role-legend-swatches

3

role-legend-labels

3

role-legend-title

1

Glyph Inspector

none

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