Graflume · Alpha

Bar · Chart-specific features

Compare categorical magnitudes with bars sharing a common baseline. These tabs come from Graflume's public catalog. Every mode owns runnable data, options, a Quick API, and source-backed feature claims.

Chart family · Default families

Bar

Compare categorical magnitudes with bars sharing a common baseline.

Quick API
bar()
Browser snapshot
graflume
mark
bar
Presets
9

Chart-specific features

Every executable mode in this family

These tabs come from Graflume's public catalog. Every mode owns runnable data, options, a Quick API, and source-backed feature claims.

Bar chart

Bar chart uses runnable data and options to demonstrate horizontal and vertical bars; automatic total and segment labels.

StatusLoading

  • bar
  • horizontal and vertical bars
  • automatic total and segment labels
Graflume.horizontalBar() Canvas 2D
Control help

Zoom and pan inspect the rendered surface without changing data axes or values. When playback controls are available, they move through real steps in the order each unique value first appears in the source data.

Use Tab to reach a control and Enter or Space to activate it. With the chart focused, use plus and minus to zoom and arrow keys to pan.

Auto placement compares perimeter candidates and avoids the plot, legend, and other callouts when possible. Explicit placement is preserved with only necessary safety correction. Callout text wraps safely inside the bubble. Long unbroken tokens are visually shortened within the line budget, while the complete source text remains available to assistive technology.

Loading

Browser API · Portable schema

Browser API

Graflume.horizontalBar()

const data = [
  {
    "category": "Insights",
    "high": 91,
    "low": 81,
    "previous": 74,
    "target": 88,
    "value": 86,
    "width": 24
  },
  {
    "category": "Dashboards",
    "high": 84,
    "low": 72,
    "previous": 69,
    "target": 82,
    "value": 78,
    "width": 21
  },
  {
    "category": "Reports",
    "high": 76,
    "low": 63,
    "previous": 65,
    "target": 74,
    "value": 69,
    "width": 18
  },
  {
    "category": "Alerts",
    "high": 68,
    "low": 55,
    "previous": 48,
    "target": 66,
    "value": 61,
    "width": 15
  },
  {
    "category": "Models",
    "high": 56,
    "low": 42,
    "previous": 41,
    "target": 55,
    "value": 48,
    "width": 12
  },
  {
    "category": "Exports",
    "high": 45,
    "low": 31,
    "previous": 34,
    "target": 44,
    "value": 37,
    "width": 10
  }
];

const options = {
  "accessibility": {
    "description": "Zoom and pan inspect the rendered surface without changing data axes or values. When playback controls are available, they move through real steps in the order each unique value first appears in the source data.",
    "label": "Bar example"
  },
  "axes": {
    "x": {
      "labels": {
        "maxLength": 18,
        "orientation": "vertical-up",
        "padding": 10
      },
      "ticks": {
        "spacing": 10
      }
    },
    "y": {
      "format": {
        "type": "compact"
      }
    }
  },
  "height": 620,
  "interaction": {
    "controls": {
      "annotations": false,
      "export": true,
      "fullscreen": true,
      "labels": {
        "controls": "Chart controls",
        "enterFullscreen": "Enter fullscreen",
        "exitFullscreen": "Exit fullscreen",
        "exportPng": "Download PNG",
        "hideAnnotations": "Hide callouts",
        "loop": "Loop playback",
        "nextFrame": "Next frame",
        "pause": "Pause",
        "play": "Play",
        "previousFrame": "Previous frame",
        "reset": "Reset view",
        "seek": "Playback position",
        "showAnnotations": "Show callouts",
        "speed": "Playback speed",
        "zoomIn": "Zoom in",
        "zoomOut": "Zoom out"
      },
      "playback": false,
      "reset": true,
      "zoom": true
    },
    "hover": true,
    "navigation": {
      "drag": true,
      "keyboard": true,
      "maxZoom": 6,
      "minZoom": 1,
      "pinch": true,
      "wheel": "modifier"
    },
    "tooltip": {
      "axis": "x",
      "fields": [
        {
          "field": "value",
          "format": "number",
          "label": "Value"
        },
        {
          "field": "category",
          "format": "auto",
          "label": "Category"
        }
      ],
      "title": "Bar",
      "trigger": "axis"
    }
  },
  "locale": "en",
  "mark": {
    "orientation": "horizontal"
  },
  "padding": {
    "bottom": 112,
    "left": 64,
    "right": 30,
    "top": 52
  },
  "theme": "graflume-light",
  "title": {
    "subtitle": "Bar chart uses runnable data and options to demonstrate horizontal and vertical bars; automatic total and segment labels.",
    "text": "Bar"
  },
  "width": "container",
  "x": {
    "field": "value",
    "title": "Adoption (%)",
    "type": "quantitative"
  },
  "y": {
    "field": "category",
    "title": "Capability",
    "type": "ordinal"
  }
};

Graflume.horizontalBar('#chart', data, options);

Portable schema

ChartSpec 0.1 · options

{
  "accessibility": {
    "description": "Zoom and pan inspect the rendered surface without changing data axes or values. When playback controls are available, they move through real steps in the order each unique value first appears in the source data.",
    "label": "Bar example"
  },
  "axes": {
    "x": {
      "labels": {
        "maxLength": 18,
        "orientation": "vertical-up",
        "padding": 10
      },
      "ticks": {
        "spacing": 10
      }
    },
    "y": {
      "format": {
        "type": "compact"
      }
    }
  },
  "height": 620,
  "interaction": {
    "controls": {
      "annotations": false,
      "export": true,
      "fullscreen": true,
      "labels": {
        "controls": "Chart controls",
        "enterFullscreen": "Enter fullscreen",
        "exitFullscreen": "Exit fullscreen",
        "exportPng": "Download PNG",
        "hideAnnotations": "Hide callouts",
        "loop": "Loop playback",
        "nextFrame": "Next frame",
        "pause": "Pause",
        "play": "Play",
        "previousFrame": "Previous frame",
        "reset": "Reset view",
        "seek": "Playback position",
        "showAnnotations": "Show callouts",
        "speed": "Playback speed",
        "zoomIn": "Zoom in",
        "zoomOut": "Zoom out"
      },
      "playback": false,
      "reset": true,
      "zoom": true
    },
    "hover": true,
    "navigation": {
      "drag": true,
      "keyboard": true,
      "maxZoom": 6,
      "minZoom": 1,
      "pinch": true,
      "wheel": "modifier"
    },
    "tooltip": {
      "axis": "x",
      "fields": [
        {
          "field": "value",
          "format": "number",
          "label": "Value"
        },
        {
          "field": "category",
          "format": "auto",
          "label": "Category"
        }
      ],
      "title": "Bar",
      "trigger": "axis"
    }
  },
  "locale": "en",
  "mark": {
    "orientation": "horizontal"
  },
  "padding": {
    "bottom": 112,
    "left": 64,
    "right": 30,
    "top": 52
  },
  "theme": "graflume-light",
  "title": {
    "subtitle": "Bar chart uses runnable data and options to demonstrate horizontal and vertical bars; automatic total and segment labels.",
    "text": "Bar"
  },
  "width": "container",
  "x": {
    "field": "value",
    "title": "Adoption (%)",
    "type": "quantitative"
  },
  "y": {
    "field": "category",
    "title": "Capability",
    "type": "ordinal"
  }
}

Catalog

Modes · compatibility identifiers

The source-controlled catalog maps callable modes in this family and compatibility identifiers to their canonical modes. This table contains executable entries only.

9 modes · 8 compatibility identifiers

Bar · supported modes · representative bar
IDNameQuick APImodemarkrenderer
barBar charthorizontalBar()horizontalbarcanvas
columnColumn chartcolumn()verticalbarcanvas
pictorial-barPictorial bar chartpictorialBar()pictorialpictorial-barcanvas
bulletBullet chartbullet()bulletbulletcanvas
column-pyramidColumn pyramid chartcolumnPyramid()column-pyramidpyramidcanvas
cylinderCylinder chartcylinder()cylindercylindercanvas
lollipopLollipop chartlollipop()lollipoplollipopcanvas
pictorial-columnPictorial column chartpictorialColumn()pictorial-columnpictorial-barcanvas
variable-widthVariable width column chartvariableWidth()variable-widthvariwidecanvas
Bar · compatibility identifiers
IdentifierCanonical mode ID
barbar
bulletbullet
columncolumn
columnpyramidcolumn-pyramid
cylindercylinder
lollipoplollipop
pictorialpictorial-column
variwidevariable-width

Manual

Integration checklist

ARIA · table fallback

Accessibility

Canvas ARIA metadata is paired with a text summary and table fallback.

standard · large · ultra

Performance

Standard, large, and ultra profiles bound rendering work.