Bar Chart

Discrete categories compile to rect bars, text labels, and a quantitative value scale.

Bar Chart

Data Sources

4

Fields

4

Scales

2

Layers

7

Glyphs

105

line 38 / rect 31 / text 36

Category 1: 5Category 2: 10Category 3: 8Category 4: 3Category 5: 15Category 6: 13Category 7: 16Category 8: 6Category 9: 20Category 10: 7Category 11: 11Category 12: 18Category 13: 17Category 14: 9Category 15: 16Category 16: 14Category 17: 4Category 18: 19Category 19: 12.5Category 20: 8Category 21: 15Category 22: 14.5Category 23: 16Category 24: 2Category 25: 5Category 26: 2Category 27: 10.5Category 28: 8Category 29: 17Category 30: 12Category 31: 61234567891011121314151617181920212223242526272829303105101520

Data Flow Diagram

0/939 nodes
0/1885 edges
939 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

4 tables
0 transforms

Category values

bars
raw
6 columns

ChartSpec

{
  "id": "gallery.bar",
  "data": [
    {
      "id": "bars",
      "rows": 31
    },
    {
      "id": "__guide.y-grid",
      "rows": 5
    },
    {
      "id": "__guide.x",
      "rows": 31
    },
    {
      "id": "__guide.y",
      "rows": 5
    }
  ],
  "transforms": [],
  "axes": [
    {
      "id": "x",
      "scale": "x",
      "orientation": "bottom"
    },
    {
      "id": "y",
      "scale": "y",
      "orientation": "left"
    }
  ],
  "grids": [
    {
      "id": "y-grid",
      "scale": "y",
      "orientation": "y"
    }
  ],
  "fields": [
    "label",
    "value",
    "formatted",
    "tooltip"
  ],
  "scales": [
    {
      "id": "x",
      "type": "band",
      "domain": {
        "source": "field",
        "data": "bars",
        "field": "label"
      }
    },
    {
      "id": "y",
      "type": "linear",
      "domain": {
        "source": "values",
        "values": [
          0,
          20
        ],
        "includeZero": true
      }
    }
  ],
  "layers": [
    {
      "id": "y-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": "bars",
      "mark": "rect",
      "role": "data"
    }
  ]
}

Resolved SceneGraph

{
  "scene": "gallery.bar.scene",
  "scales": [
    {
      "id": "x",
      "type": "band",
      "domain": [
        "1",
        "2",
        "3",
        "4",
        "5",
        "6",
        "7",
        "8",
        "9",
        "10",
        "11",
        "12",
        "13",
        "14",
        "15",
        "16",
        "17",
        "18",
        "19",
        "20",
        "21",
        "22",
        "23",
        "24",
        "25",
        "26",
        "27",
        "28",
        "29",
        "30",
        "31"
      ],
      "range": [
        58,
        696
      ],
      "bandwidth": 15.7020725388601
    },
    {
      "id": "y",
      "type": "linear",
      "domain": [
        0,
        20
      ],
      "range": [
        286,
        22
      ],
      "ticks": [
        0,
        5,
        10,
        15,
        20
      ]
    }
  ],
  "layers": [
    {
      "id": "y-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": 31
    },
    {
      "id": "bars",
      "role": "data",
      "zIndex": 10,
      "glyphs": 31
    },
    {
      "id": "x-labels",
      "role": "guide",
      "zIndex": 20,
      "glyphs": 31
    },
    {
      "id": "y-labels",
      "role": "guide",
      "zIndex": 20,
      "glyphs": 5
    }
  ]
}

Glyph Data Tree

7 layers

Full parameter lineage for the active compiler surface.

y-grid

5

x-axis

1

y-axis

1

x-tick-marks

31

bars

31

x-labels

31

y-labels

5

Glyph Inspector

none

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