Graflume · Alpha

Interval · Basic implementation · Common features

Compare a center value with lower and upper bounds for each category. Start with only the required data and family encoding. Expand the code to run the same example. Use the tabs to compare header, tooltip, theme, legend, highlight, callout, selection, view controls, and accessibility one feature at a time.

Chart family · Default families

Interval

Compare a center value with lower and upper bounds for each category.

Quick API
intervals()
Browser snapshot
graflume
mark
interval
Presets
6

Basic implementation

The smallest runnable chart

Start with only the required data and family encoding. Expand the code to run the same example.

Basic example

Compare a center value with lower and upper bounds for each category.

StatusLoading

  • minimal-implementation
Graflume.intervals() 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.intervals()

const data = [
  {
    "category": "Guided setup",
    "high": 10.8,
    "low": 5.9,
    "previous": 4.1,
    "value": 8.4
  },
  {
    "category": "Saved views",
    "high": 8.6,
    "low": 4.8,
    "previous": 2.8,
    "value": 6.7
  },
  {
    "category": "Smart alerts",
    "high": 7.5,
    "low": 2.6,
    "previous": 1.7,
    "value": 5.1
  },
  {
    "category": "Team sharing",
    "high": 6.3,
    "low": 1.4,
    "previous": 1.5,
    "value": 3.9
  },
  {
    "category": "CSV onboarding",
    "high": 4.8,
    "low": -0.3,
    "previous": 0.8,
    "value": 2.3
  }
];

const options = {
  "height": 620,
  "locale": "en",
  "mark": {
    "fields": {
      "high": "high",
      "low": "low"
    }
  },
  "width": "container",
  "x": {
    "field": "category",
    "title": "Experiment",
    "type": "ordinal"
  },
  "y": {
    "field": "value",
    "title": "Lift (points)",
    "type": "quantitative"
  }
};

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

Portable schema

ChartSpec 0.1 · options

{
  "height": 620,
  "locale": "en",
  "mark": {
    "fields": {
      "high": "high",
      "low": "low"
    }
  },
  "width": "container",
  "x": {
    "field": "category",
    "title": "Experiment",
    "type": "ordinal"
  },
  "y": {
    "field": "value",
    "title": "Lift (points)",
    "type": "quantitative"
  }
}

Common features

Features shared by every chart

Use the tabs to compare header, tooltip, theme, legend, highlight, callout, selection, view controls, and accessibility one feature at a time. Hover over a data mark. On supported charts, move the pointer along the axis to see the nearest value. All exact values are available in the table below.

Header

Add a chart title and supporting description inside the visualization.

StatusLoading

  • header
Graflume.intervals() 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.intervals()

const data = [
  {
    "category": "Guided setup",
    "high": 10.8,
    "low": 5.9,
    "previous": 4.1,
    "value": 8.4
  },
  {
    "category": "Saved views",
    "high": 8.6,
    "low": 4.8,
    "previous": 2.8,
    "value": 6.7
  },
  {
    "category": "Smart alerts",
    "high": 7.5,
    "low": 2.6,
    "previous": 1.7,
    "value": 5.1
  },
  {
    "category": "Team sharing",
    "high": 6.3,
    "low": 1.4,
    "previous": 1.5,
    "value": 3.9
  },
  {
    "category": "CSV onboarding",
    "high": 4.8,
    "low": -0.3,
    "previous": 0.8,
    "value": 2.3
  }
];

const options = {
  "height": 620,
  "locale": "en",
  "mark": {
    "fields": {
      "high": "high",
      "low": "low"
    }
  },
  "title": {
    "subtitle": "Intervals uses runnable data and options to demonstrate precomputed vertical interval; horizontal errors.",
    "text": "Interval"
  },
  "width": "container",
  "x": {
    "field": "category",
    "title": "Experiment",
    "type": "ordinal"
  },
  "y": {
    "field": "value",
    "title": "Lift (points)",
    "type": "quantitative"
  }
};

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

Portable schema

ChartSpec 0.1 · options

{
  "height": 620,
  "locale": "en",
  "mark": {
    "fields": {
      "high": "high",
      "low": "low"
    }
  },
  "title": {
    "subtitle": "Intervals uses runnable data and options to demonstrate precomputed vertical interval; horizontal errors.",
    "text": "Interval"
  },
  "width": "container",
  "x": {
    "field": "category",
    "title": "Experiment",
    "type": "ordinal"
  },
  "y": {
    "field": "value",
    "title": "Lift (points)",
    "type": "quantitative"
  }
}