Graflume · Alpha

Raster image

Build an interactive raster from explicit cell coordinates and RGB values stored as rows.

Chart family · Advanced families

Raster image

Build an interactive raster from explicit cell coordinates and RGB values stored as rows.

Quick API
image()
Browser snapshot
graflume/complete
mark
image
Presets
1

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

Build an interactive raster from explicit cell coordinates and RGB values stored as rows.

StatusLoading

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

const data = [
  {
    "blue": 224,
    "green": 52,
    "red": 32,
    "x": 0,
    "y": 0
  },
  {
    "blue": 216,
    "green": 52,
    "red": 49,
    "x": 1,
    "y": 0
  },
  {
    "blue": 207,
    "green": 52,
    "red": 66,
    "x": 2,
    "y": 0
  },
  {
    "blue": 199,
    "green": 52,
    "red": 82,
    "x": 3,
    "y": 0
  },
  {
    "blue": 190,
    "green": 52,
    "red": 99,
    "x": 4,
    "y": 0
  },
  {
    "blue": 182,
    "green": 52,
    "red": 116,
    "x": 5,
    "y": 0
  },
  {
    "blue": 174,
    "green": 52,
    "red": 133,
    "x": 6,
    "y": 0
  },
  {
    "blue": 165,
    "green": 52,
    "red": 150,
    "x": 7,
    "y": 0
  },
  {
    "blue": 157,
    "green": 52,
    "red": 166,
    "x": 8,
    "y": 0
  },
  {
    "blue": 148,
    "green": 52,
    "red": 183,
    "x": 9,
    "y": 0
  },
  {
    "blue": 140,
    "green": 52,
    "red": 200,
    "x": 10,
    "y": 0
  },
  {
    "blue": 132,
    "green": 52,
    "red": 217,
    "x": 11,
    "y": 0
  },
  {
    "blue": 216,
    "green": 77,
    "red": 32,
    "x": 0,
    "y": 1
  },
  {
    "blue": 207,
    "green": 77,
    "red": 49,
    "x": 1,
    "y": 1
  },
  {
    "blue": 199,
    "green": 77,
    "red": 66,
    "x": 2,
    "y": 1
  },
  {
    "blue": 190,
    "green": 77,
    "red": 82,
    "x": 3,
    "y": 1
  },
  {
    "blue": 182,
    "green": 77,
    "red": 99,
    "x": 4,
    "y": 1
  },
  {
    "blue": 174,
    "green": 77,
    "red": 116,
    "x": 5,
    "y": 1
  },
  {
    "blue": 165,
    "green": 77,
    "red": 133,
    "x": 6,
    "y": 1
  },
  {
    "blue": 157,
    "green": 77,
    "red": 150,
    "x": 7,
    "y": 1
  },
  {
    "blue": 148,
    "green": 77,
    "red": 166,
    "x": 8,
    "y": 1
  },
  {
    "blue": 140,
    "green": 77,
    "red": 183,
    "x": 9,
    "y": 1
  },
  {
    "blue": 132,
    "green": 77,
    "red": 200,
    "x": 10,
    "y": 1
  },
  {
    "blue": 123,
    "green": 77,
    "red": 217,
    "x": 11,
    "y": 1
  },
  {
    "blue": 207,
    "green": 101,
    "red": 32,
    "x": 0,
    "y": 2
  },
  {
    "blue": 199,
    "green": 101,
    "red": 49,
    "x": 1,
    "y": 2
  },
  {
    "blue": 190,
    "green": 101,
    "red": 66,
    "x": 2,
    "y": 2
  },
  {
    "blue": 182,
    "green": 101,
    "red": 82,
    "x": 3,
    "y": 2
  },
  {
    "blue": 174,
    "green": 101,
    "red": 99,
    "x": 4,
    "y": 2
  },
  {
    "blue": 165,
    "green": 101,
    "red": 116,
    "x": 5,
    "y": 2
  },
  {
    "blue": 157,
    "green": 101,
    "red": 133,
    "x": 6,
    "y": 2
  },
  {
    "blue": 148,
    "green": 101,
    "red": 150,
    "x": 7,
    "y": 2
  },
  {
    "blue": 140,
    "green": 101,
    "red": 166,
    "x": 8,
    "y": 2
  },
  {
    "blue": 132,
    "green": 101,
    "red": 183,
    "x": 9,
    "y": 2
  },
  {
    "blue": 123,
    "green": 101,
    "red": 200,
    "x": 10,
    "y": 2
  },
  {
    "blue": 115,
    "green": 101,
    "red": 217,
    "x": 11,
    "y": 2
  },
  {
    "blue": 199,
    "green": 126,
    "red": 32,
    "x": 0,
    "y": 3
  },
  {
    "blue": 190,
    "green": 126,
    "red": 49,
    "x": 1,
    "y": 3
  },
  {
    "blue": 182,
    "green": 126,
    "red": 66,
    "x": 2,
    "y": 3
  },
  {
    "blue": 174,
    "green": 126,
    "red": 82,
    "x": 3,
    "y": 3
  },
  {
    "blue": 165,
    "green": 126,
    "red": 99,
    "x": 4,
    "y": 3
  },
  {
    "blue": 157,
    "green": 126,
    "red": 116,
    "x": 5,
    "y": 3
  },
  {
    "blue": 148,
    "green": 126,
    "red": 133,
    "x": 6,
    "y": 3
  },
  {
    "blue": 140,
    "green": 126,
    "red": 150,
    "x": 7,
    "y": 3
  },
  {
    "blue": 132,
    "green": 126,
    "red": 166,
    "x": 8,
    "y": 3
  },
  {
    "blue": 123,
    "green": 126,
    "red": 183,
    "x": 9,
    "y": 3
  },
  {
    "blue": 115,
    "green": 126,
    "red": 200,
    "x": 10,
    "y": 3
  },
  {
    "blue": 106,
    "green": 126,
    "red": 217,
    "x": 11,
    "y": 3
  },
  {
    "blue": 190,
    "green": 150,
    "red": 32,
    "x": 0,
    "y": 4
  },
  {
    "blue": 182,
    "green": 150,
    "red": 49,
    "x": 1,
    "y": 4
  },
  {
    "blue": 174,
    "green": 150,
    "red": 66,
    "x": 2,
    "y": 4
  },
  {
    "blue": 165,
    "green": 150,
    "red": 82,
    "x": 3,
    "y": 4
  },
  {
    "blue": 157,
    "green": 150,
    "red": 99,
    "x": 4,
    "y": 4
  },
  {
    "blue": 148,
    "green": 150,
    "red": 116,
    "x": 5,
    "y": 4
  },
  {
    "blue": 140,
    "green": 150,
    "red": 133,
    "x": 6,
    "y": 4
  },
  {
    "blue": 132,
    "green": 150,
    "red": 150,
    "x": 7,
    "y": 4
  },
  {
    "blue": 123,
    "green": 150,
    "red": 166,
    "x": 8,
    "y": 4
  },
  {
    "blue": 115,
    "green": 150,
    "red": 183,
    "x": 9,
    "y": 4
  },
  {
    "blue": 106,
    "green": 150,
    "red": 200,
    "x": 10,
    "y": 4
  },
  {
    "blue": 98,
    "green": 150,
    "red": 217,
    "x": 11,
    "y": 4
  },
  {
    "blue": 182,
    "green": 175,
    "red": 32,
    "x": 0,
    "y": 5
  },
  {
    "blue": 174,
    "green": 175,
    "red": 49,
    "x": 1,
    "y": 5
  },
  {
    "blue": 165,
    "green": 175,
    "red": 66,
    "x": 2,
    "y": 5
  },
  {
    "blue": 157,
    "green": 175,
    "red": 82,
    "x": 3,
    "y": 5
  },
  {
    "blue": 148,
    "green": 175,
    "red": 99,
    "x": 4,
    "y": 5
  },
  {
    "blue": 140,
    "green": 175,
    "red": 116,
    "x": 5,
    "y": 5
  },
  {
    "blue": 132,
    "green": 175,
    "red": 133,
    "x": 6,
    "y": 5
  },
  {
    "blue": 123,
    "green": 175,
    "red": 150,
    "x": 7,
    "y": 5
  },
  {
    "blue": 115,
    "green": 175,
    "red": 166,
    "x": 8,
    "y": 5
  },
  {
    "blue": 106,
    "green": 175,
    "red": 183,
    "x": 9,
    "y": 5
  },
  {
    "blue": 98,
    "green": 175,
    "red": 200,
    "x": 10,
    "y": 5
  },
  {
    "blue": 90,
    "green": 175,
    "red": 217,
    "x": 11,
    "y": 5
  },
  {
    "blue": 174,
    "green": 199,
    "red": 32,
    "x": 0,
    "y": 6
  },
  {
    "blue": 165,
    "green": 199,
    "red": 49,
    "x": 1,
    "y": 6
  },
  {
    "blue": 157,
    "green": 199,
    "red": 66,
    "x": 2,
    "y": 6
  },
  {
    "blue": 148,
    "green": 199,
    "red": 82,
    "x": 3,
    "y": 6
  },
  {
    "blue": 140,
    "green": 199,
    "red": 99,
    "x": 4,
    "y": 6
  },
  {
    "blue": 132,
    "green": 199,
    "red": 116,
    "x": 5,
    "y": 6
  },
  {
    "blue": 123,
    "green": 199,
    "red": 133,
    "x": 6,
    "y": 6
  },
  {
    "blue": 115,
    "green": 199,
    "red": 150,
    "x": 7,
    "y": 6
  },
  {
    "blue": 106,
    "green": 199,
    "red": 166,
    "x": 8,
    "y": 6
  },
  {
    "blue": 98,
    "green": 199,
    "red": 183,
    "x": 9,
    "y": 6
  },
  {
    "blue": 90,
    "green": 199,
    "red": 200,
    "x": 10,
    "y": 6
  },
  {
    "blue": 81,
    "green": 199,
    "red": 217,
    "x": 11,
    "y": 6
  },
  {
    "blue": 165,
    "green": 224,
    "red": 32,
    "x": 0,
    "y": 7
  },
  {
    "blue": 157,
    "green": 224,
    "red": 49,
    "x": 1,
    "y": 7
  },
  {
    "blue": 148,
    "green": 224,
    "red": 66,
    "x": 2,
    "y": 7
  },
  {
    "blue": 140,
    "green": 224,
    "red": 82,
    "x": 3,
    "y": 7
  },
  {
    "blue": 132,
    "green": 224,
    "red": 99,
    "x": 4,
    "y": 7
  },
  {
    "blue": 123,
    "green": 224,
    "red": 116,
    "x": 5,
    "y": 7
  },
  {
    "blue": 115,
    "green": 224,
    "red": 133,
    "x": 6,
    "y": 7
  },
  {
    "blue": 106,
    "green": 224,
    "red": 150,
    "x": 7,
    "y": 7
  },
  {
    "blue": 98,
    "green": 224,
    "red": 166,
    "x": 8,
    "y": 7
  },
  {
    "blue": 90,
    "green": 224,
    "red": 183,
    "x": 9,
    "y": 7
  },
  {
    "blue": 81,
    "green": 224,
    "red": 200,
    "x": 10,
    "y": 7
  },
  {
    "blue": 73,
    "green": 224,
    "red": 217,
    "x": 11,
    "y": 7
  }
];

const options = {
  "height": 620,
  "locale": "en",
  "mark": {
    "fields": {
      "blue": "blue",
      "green": "green",
      "red": "red"
    }
  },
  "width": "container",
  "x": {
    "field": "x",
    "title": "Column",
    "type": "quantitative"
  },
  "y": {
    "field": "y",
    "title": "Row",
    "type": "quantitative"
  }
};

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

Portable schema

ChartSpec 0.1 · options

{
  "height": 620,
  "locale": "en",
  "mark": {
    "fields": {
      "blue": "blue",
      "green": "green",
      "red": "red"
    }
  },
  "width": "container",
  "x": {
    "field": "x",
    "title": "Column",
    "type": "quantitative"
  },
  "y": {
    "field": "y",
    "title": "Row",
    "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.image() 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.image()

const data = [
  {
    "blue": 224,
    "green": 52,
    "red": 32,
    "x": 0,
    "y": 0
  },
  {
    "blue": 216,
    "green": 52,
    "red": 49,
    "x": 1,
    "y": 0
  },
  {
    "blue": 207,
    "green": 52,
    "red": 66,
    "x": 2,
    "y": 0
  },
  {
    "blue": 199,
    "green": 52,
    "red": 82,
    "x": 3,
    "y": 0
  },
  {
    "blue": 190,
    "green": 52,
    "red": 99,
    "x": 4,
    "y": 0
  },
  {
    "blue": 182,
    "green": 52,
    "red": 116,
    "x": 5,
    "y": 0
  },
  {
    "blue": 174,
    "green": 52,
    "red": 133,
    "x": 6,
    "y": 0
  },
  {
    "blue": 165,
    "green": 52,
    "red": 150,
    "x": 7,
    "y": 0
  },
  {
    "blue": 157,
    "green": 52,
    "red": 166,
    "x": 8,
    "y": 0
  },
  {
    "blue": 148,
    "green": 52,
    "red": 183,
    "x": 9,
    "y": 0
  },
  {
    "blue": 140,
    "green": 52,
    "red": 200,
    "x": 10,
    "y": 0
  },
  {
    "blue": 132,
    "green": 52,
    "red": 217,
    "x": 11,
    "y": 0
  },
  {
    "blue": 216,
    "green": 77,
    "red": 32,
    "x": 0,
    "y": 1
  },
  {
    "blue": 207,
    "green": 77,
    "red": 49,
    "x": 1,
    "y": 1
  },
  {
    "blue": 199,
    "green": 77,
    "red": 66,
    "x": 2,
    "y": 1
  },
  {
    "blue": 190,
    "green": 77,
    "red": 82,
    "x": 3,
    "y": 1
  },
  {
    "blue": 182,
    "green": 77,
    "red": 99,
    "x": 4,
    "y": 1
  },
  {
    "blue": 174,
    "green": 77,
    "red": 116,
    "x": 5,
    "y": 1
  },
  {
    "blue": 165,
    "green": 77,
    "red": 133,
    "x": 6,
    "y": 1
  },
  {
    "blue": 157,
    "green": 77,
    "red": 150,
    "x": 7,
    "y": 1
  },
  {
    "blue": 148,
    "green": 77,
    "red": 166,
    "x": 8,
    "y": 1
  },
  {
    "blue": 140,
    "green": 77,
    "red": 183,
    "x": 9,
    "y": 1
  },
  {
    "blue": 132,
    "green": 77,
    "red": 200,
    "x": 10,
    "y": 1
  },
  {
    "blue": 123,
    "green": 77,
    "red": 217,
    "x": 11,
    "y": 1
  },
  {
    "blue": 207,
    "green": 101,
    "red": 32,
    "x": 0,
    "y": 2
  },
  {
    "blue": 199,
    "green": 101,
    "red": 49,
    "x": 1,
    "y": 2
  },
  {
    "blue": 190,
    "green": 101,
    "red": 66,
    "x": 2,
    "y": 2
  },
  {
    "blue": 182,
    "green": 101,
    "red": 82,
    "x": 3,
    "y": 2
  },
  {
    "blue": 174,
    "green": 101,
    "red": 99,
    "x": 4,
    "y": 2
  },
  {
    "blue": 165,
    "green": 101,
    "red": 116,
    "x": 5,
    "y": 2
  },
  {
    "blue": 157,
    "green": 101,
    "red": 133,
    "x": 6,
    "y": 2
  },
  {
    "blue": 148,
    "green": 101,
    "red": 150,
    "x": 7,
    "y": 2
  },
  {
    "blue": 140,
    "green": 101,
    "red": 166,
    "x": 8,
    "y": 2
  },
  {
    "blue": 132,
    "green": 101,
    "red": 183,
    "x": 9,
    "y": 2
  },
  {
    "blue": 123,
    "green": 101,
    "red": 200,
    "x": 10,
    "y": 2
  },
  {
    "blue": 115,
    "green": 101,
    "red": 217,
    "x": 11,
    "y": 2
  },
  {
    "blue": 199,
    "green": 126,
    "red": 32,
    "x": 0,
    "y": 3
  },
  {
    "blue": 190,
    "green": 126,
    "red": 49,
    "x": 1,
    "y": 3
  },
  {
    "blue": 182,
    "green": 126,
    "red": 66,
    "x": 2,
    "y": 3
  },
  {
    "blue": 174,
    "green": 126,
    "red": 82,
    "x": 3,
    "y": 3
  },
  {
    "blue": 165,
    "green": 126,
    "red": 99,
    "x": 4,
    "y": 3
  },
  {
    "blue": 157,
    "green": 126,
    "red": 116,
    "x": 5,
    "y": 3
  },
  {
    "blue": 148,
    "green": 126,
    "red": 133,
    "x": 6,
    "y": 3
  },
  {
    "blue": 140,
    "green": 126,
    "red": 150,
    "x": 7,
    "y": 3
  },
  {
    "blue": 132,
    "green": 126,
    "red": 166,
    "x": 8,
    "y": 3
  },
  {
    "blue": 123,
    "green": 126,
    "red": 183,
    "x": 9,
    "y": 3
  },
  {
    "blue": 115,
    "green": 126,
    "red": 200,
    "x": 10,
    "y": 3
  },
  {
    "blue": 106,
    "green": 126,
    "red": 217,
    "x": 11,
    "y": 3
  },
  {
    "blue": 190,
    "green": 150,
    "red": 32,
    "x": 0,
    "y": 4
  },
  {
    "blue": 182,
    "green": 150,
    "red": 49,
    "x": 1,
    "y": 4
  },
  {
    "blue": 174,
    "green": 150,
    "red": 66,
    "x": 2,
    "y": 4
  },
  {
    "blue": 165,
    "green": 150,
    "red": 82,
    "x": 3,
    "y": 4
  },
  {
    "blue": 157,
    "green": 150,
    "red": 99,
    "x": 4,
    "y": 4
  },
  {
    "blue": 148,
    "green": 150,
    "red": 116,
    "x": 5,
    "y": 4
  },
  {
    "blue": 140,
    "green": 150,
    "red": 133,
    "x": 6,
    "y": 4
  },
  {
    "blue": 132,
    "green": 150,
    "red": 150,
    "x": 7,
    "y": 4
  },
  {
    "blue": 123,
    "green": 150,
    "red": 166,
    "x": 8,
    "y": 4
  },
  {
    "blue": 115,
    "green": 150,
    "red": 183,
    "x": 9,
    "y": 4
  },
  {
    "blue": 106,
    "green": 150,
    "red": 200,
    "x": 10,
    "y": 4
  },
  {
    "blue": 98,
    "green": 150,
    "red": 217,
    "x": 11,
    "y": 4
  },
  {
    "blue": 182,
    "green": 175,
    "red": 32,
    "x": 0,
    "y": 5
  },
  {
    "blue": 174,
    "green": 175,
    "red": 49,
    "x": 1,
    "y": 5
  },
  {
    "blue": 165,
    "green": 175,
    "red": 66,
    "x": 2,
    "y": 5
  },
  {
    "blue": 157,
    "green": 175,
    "red": 82,
    "x": 3,
    "y": 5
  },
  {
    "blue": 148,
    "green": 175,
    "red": 99,
    "x": 4,
    "y": 5
  },
  {
    "blue": 140,
    "green": 175,
    "red": 116,
    "x": 5,
    "y": 5
  },
  {
    "blue": 132,
    "green": 175,
    "red": 133,
    "x": 6,
    "y": 5
  },
  {
    "blue": 123,
    "green": 175,
    "red": 150,
    "x": 7,
    "y": 5
  },
  {
    "blue": 115,
    "green": 175,
    "red": 166,
    "x": 8,
    "y": 5
  },
  {
    "blue": 106,
    "green": 175,
    "red": 183,
    "x": 9,
    "y": 5
  },
  {
    "blue": 98,
    "green": 175,
    "red": 200,
    "x": 10,
    "y": 5
  },
  {
    "blue": 90,
    "green": 175,
    "red": 217,
    "x": 11,
    "y": 5
  },
  {
    "blue": 174,
    "green": 199,
    "red": 32,
    "x": 0,
    "y": 6
  },
  {
    "blue": 165,
    "green": 199,
    "red": 49,
    "x": 1,
    "y": 6
  },
  {
    "blue": 157,
    "green": 199,
    "red": 66,
    "x": 2,
    "y": 6
  },
  {
    "blue": 148,
    "green": 199,
    "red": 82,
    "x": 3,
    "y": 6
  },
  {
    "blue": 140,
    "green": 199,
    "red": 99,
    "x": 4,
    "y": 6
  },
  {
    "blue": 132,
    "green": 199,
    "red": 116,
    "x": 5,
    "y": 6
  },
  {
    "blue": 123,
    "green": 199,
    "red": 133,
    "x": 6,
    "y": 6
  },
  {
    "blue": 115,
    "green": 199,
    "red": 150,
    "x": 7,
    "y": 6
  },
  {
    "blue": 106,
    "green": 199,
    "red": 166,
    "x": 8,
    "y": 6
  },
  {
    "blue": 98,
    "green": 199,
    "red": 183,
    "x": 9,
    "y": 6
  },
  {
    "blue": 90,
    "green": 199,
    "red": 200,
    "x": 10,
    "y": 6
  },
  {
    "blue": 81,
    "green": 199,
    "red": 217,
    "x": 11,
    "y": 6
  },
  {
    "blue": 165,
    "green": 224,
    "red": 32,
    "x": 0,
    "y": 7
  },
  {
    "blue": 157,
    "green": 224,
    "red": 49,
    "x": 1,
    "y": 7
  },
  {
    "blue": 148,
    "green": 224,
    "red": 66,
    "x": 2,
    "y": 7
  },
  {
    "blue": 140,
    "green": 224,
    "red": 82,
    "x": 3,
    "y": 7
  },
  {
    "blue": 132,
    "green": 224,
    "red": 99,
    "x": 4,
    "y": 7
  },
  {
    "blue": 123,
    "green": 224,
    "red": 116,
    "x": 5,
    "y": 7
  },
  {
    "blue": 115,
    "green": 224,
    "red": 133,
    "x": 6,
    "y": 7
  },
  {
    "blue": 106,
    "green": 224,
    "red": 150,
    "x": 7,
    "y": 7
  },
  {
    "blue": 98,
    "green": 224,
    "red": 166,
    "x": 8,
    "y": 7
  },
  {
    "blue": 90,
    "green": 224,
    "red": 183,
    "x": 9,
    "y": 7
  },
  {
    "blue": 81,
    "green": 224,
    "red": 200,
    "x": 10,
    "y": 7
  },
  {
    "blue": 73,
    "green": 224,
    "red": 217,
    "x": 11,
    "y": 7
  }
];

const options = {
  "height": 620,
  "locale": "en",
  "mark": {
    "fields": {
      "blue": "blue",
      "green": "green",
      "red": "red"
    }
  },
  "title": {
    "subtitle": "Raster image uses runnable data and options to demonstrate row RGB/RGBA or explicit color pixels; numeric and band coordinates.",
    "text": "Raster image"
  },
  "width": "container",
  "x": {
    "field": "x",
    "title": "Column",
    "type": "quantitative"
  },
  "y": {
    "field": "y",
    "title": "Row",
    "type": "quantitative"
  }
};

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

Portable schema

ChartSpec 0.1 · options

{
  "height": 620,
  "locale": "en",
  "mark": {
    "fields": {
      "blue": "blue",
      "green": "green",
      "red": "red"
    }
  },
  "title": {
    "subtitle": "Raster image uses runnable data and options to demonstrate row RGB/RGBA or explicit color pixels; numeric and band coordinates.",
    "text": "Raster image"
  },
  "width": "container",
  "x": {
    "field": "x",
    "title": "Column",
    "type": "quantitative"
  },
  "y": {
    "field": "y",
    "title": "Row",
    "type": "quantitative"
  }
}

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.

Raster image

Raster image uses runnable data and options to demonstrate row RGB/RGBA or explicit color pixels; numeric and band coordinates.

StatusLoading

  • image
  • row RGB/RGBA or explicit color pixels
  • numeric and band coordinates
  • exact pixel hit
  • RGBA channel composition
  • extent and origin
  • resampling
  • colormap and window mapping
Graflume.image() 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.image()

const data = [
  {
    "blue": 224,
    "green": 52,
    "red": 32,
    "x": 0,
    "y": 0
  },
  {
    "blue": 216,
    "green": 52,
    "red": 49,
    "x": 1,
    "y": 0
  },
  {
    "blue": 207,
    "green": 52,
    "red": 66,
    "x": 2,
    "y": 0
  },
  {
    "blue": 199,
    "green": 52,
    "red": 82,
    "x": 3,
    "y": 0
  },
  {
    "blue": 190,
    "green": 52,
    "red": 99,
    "x": 4,
    "y": 0
  },
  {
    "blue": 182,
    "green": 52,
    "red": 116,
    "x": 5,
    "y": 0
  },
  {
    "blue": 174,
    "green": 52,
    "red": 133,
    "x": 6,
    "y": 0
  },
  {
    "blue": 165,
    "green": 52,
    "red": 150,
    "x": 7,
    "y": 0
  },
  {
    "blue": 157,
    "green": 52,
    "red": 166,
    "x": 8,
    "y": 0
  },
  {
    "blue": 148,
    "green": 52,
    "red": 183,
    "x": 9,
    "y": 0
  },
  {
    "blue": 140,
    "green": 52,
    "red": 200,
    "x": 10,
    "y": 0
  },
  {
    "blue": 132,
    "green": 52,
    "red": 217,
    "x": 11,
    "y": 0
  },
  {
    "blue": 216,
    "green": 77,
    "red": 32,
    "x": 0,
    "y": 1
  },
  {
    "blue": 207,
    "green": 77,
    "red": 49,
    "x": 1,
    "y": 1
  },
  {
    "blue": 199,
    "green": 77,
    "red": 66,
    "x": 2,
    "y": 1
  },
  {
    "blue": 190,
    "green": 77,
    "red": 82,
    "x": 3,
    "y": 1
  },
  {
    "blue": 182,
    "green": 77,
    "red": 99,
    "x": 4,
    "y": 1
  },
  {
    "blue": 174,
    "green": 77,
    "red": 116,
    "x": 5,
    "y": 1
  },
  {
    "blue": 165,
    "green": 77,
    "red": 133,
    "x": 6,
    "y": 1
  },
  {
    "blue": 157,
    "green": 77,
    "red": 150,
    "x": 7,
    "y": 1
  },
  {
    "blue": 148,
    "green": 77,
    "red": 166,
    "x": 8,
    "y": 1
  },
  {
    "blue": 140,
    "green": 77,
    "red": 183,
    "x": 9,
    "y": 1
  },
  {
    "blue": 132,
    "green": 77,
    "red": 200,
    "x": 10,
    "y": 1
  },
  {
    "blue": 123,
    "green": 77,
    "red": 217,
    "x": 11,
    "y": 1
  },
  {
    "blue": 207,
    "green": 101,
    "red": 32,
    "x": 0,
    "y": 2
  },
  {
    "blue": 199,
    "green": 101,
    "red": 49,
    "x": 1,
    "y": 2
  },
  {
    "blue": 190,
    "green": 101,
    "red": 66,
    "x": 2,
    "y": 2
  },
  {
    "blue": 182,
    "green": 101,
    "red": 82,
    "x": 3,
    "y": 2
  },
  {
    "blue": 174,
    "green": 101,
    "red": 99,
    "x": 4,
    "y": 2
  },
  {
    "blue": 165,
    "green": 101,
    "red": 116,
    "x": 5,
    "y": 2
  },
  {
    "blue": 157,
    "green": 101,
    "red": 133,
    "x": 6,
    "y": 2
  },
  {
    "blue": 148,
    "green": 101,
    "red": 150,
    "x": 7,
    "y": 2
  },
  {
    "blue": 140,
    "green": 101,
    "red": 166,
    "x": 8,
    "y": 2
  },
  {
    "blue": 132,
    "green": 101,
    "red": 183,
    "x": 9,
    "y": 2
  },
  {
    "blue": 123,
    "green": 101,
    "red": 200,
    "x": 10,
    "y": 2
  },
  {
    "blue": 115,
    "green": 101,
    "red": 217,
    "x": 11,
    "y": 2
  },
  {
    "blue": 199,
    "green": 126,
    "red": 32,
    "x": 0,
    "y": 3
  },
  {
    "blue": 190,
    "green": 126,
    "red": 49,
    "x": 1,
    "y": 3
  },
  {
    "blue": 182,
    "green": 126,
    "red": 66,
    "x": 2,
    "y": 3
  },
  {
    "blue": 174,
    "green": 126,
    "red": 82,
    "x": 3,
    "y": 3
  },
  {
    "blue": 165,
    "green": 126,
    "red": 99,
    "x": 4,
    "y": 3
  },
  {
    "blue": 157,
    "green": 126,
    "red": 116,
    "x": 5,
    "y": 3
  },
  {
    "blue": 148,
    "green": 126,
    "red": 133,
    "x": 6,
    "y": 3
  },
  {
    "blue": 140,
    "green": 126,
    "red": 150,
    "x": 7,
    "y": 3
  },
  {
    "blue": 132,
    "green": 126,
    "red": 166,
    "x": 8,
    "y": 3
  },
  {
    "blue": 123,
    "green": 126,
    "red": 183,
    "x": 9,
    "y": 3
  },
  {
    "blue": 115,
    "green": 126,
    "red": 200,
    "x": 10,
    "y": 3
  },
  {
    "blue": 106,
    "green": 126,
    "red": 217,
    "x": 11,
    "y": 3
  },
  {
    "blue": 190,
    "green": 150,
    "red": 32,
    "x": 0,
    "y": 4
  },
  {
    "blue": 182,
    "green": 150,
    "red": 49,
    "x": 1,
    "y": 4
  },
  {
    "blue": 174,
    "green": 150,
    "red": 66,
    "x": 2,
    "y": 4
  },
  {
    "blue": 165,
    "green": 150,
    "red": 82,
    "x": 3,
    "y": 4
  },
  {
    "blue": 157,
    "green": 150,
    "red": 99,
    "x": 4,
    "y": 4
  },
  {
    "blue": 148,
    "green": 150,
    "red": 116,
    "x": 5,
    "y": 4
  },
  {
    "blue": 140,
    "green": 150,
    "red": 133,
    "x": 6,
    "y": 4
  },
  {
    "blue": 132,
    "green": 150,
    "red": 150,
    "x": 7,
    "y": 4
  },
  {
    "blue": 123,
    "green": 150,
    "red": 166,
    "x": 8,
    "y": 4
  },
  {
    "blue": 115,
    "green": 150,
    "red": 183,
    "x": 9,
    "y": 4
  },
  {
    "blue": 106,
    "green": 150,
    "red": 200,
    "x": 10,
    "y": 4
  },
  {
    "blue": 98,
    "green": 150,
    "red": 217,
    "x": 11,
    "y": 4
  },
  {
    "blue": 182,
    "green": 175,
    "red": 32,
    "x": 0,
    "y": 5
  },
  {
    "blue": 174,
    "green": 175,
    "red": 49,
    "x": 1,
    "y": 5
  },
  {
    "blue": 165,
    "green": 175,
    "red": 66,
    "x": 2,
    "y": 5
  },
  {
    "blue": 157,
    "green": 175,
    "red": 82,
    "x": 3,
    "y": 5
  },
  {
    "blue": 148,
    "green": 175,
    "red": 99,
    "x": 4,
    "y": 5
  },
  {
    "blue": 140,
    "green": 175,
    "red": 116,
    "x": 5,
    "y": 5
  },
  {
    "blue": 132,
    "green": 175,
    "red": 133,
    "x": 6,
    "y": 5
  },
  {
    "blue": 123,
    "green": 175,
    "red": 150,
    "x": 7,
    "y": 5
  },
  {
    "blue": 115,
    "green": 175,
    "red": 166,
    "x": 8,
    "y": 5
  },
  {
    "blue": 106,
    "green": 175,
    "red": 183,
    "x": 9,
    "y": 5
  },
  {
    "blue": 98,
    "green": 175,
    "red": 200,
    "x": 10,
    "y": 5
  },
  {
    "blue": 90,
    "green": 175,
    "red": 217,
    "x": 11,
    "y": 5
  },
  {
    "blue": 174,
    "green": 199,
    "red": 32,
    "x": 0,
    "y": 6
  },
  {
    "blue": 165,
    "green": 199,
    "red": 49,
    "x": 1,
    "y": 6
  },
  {
    "blue": 157,
    "green": 199,
    "red": 66,
    "x": 2,
    "y": 6
  },
  {
    "blue": 148,
    "green": 199,
    "red": 82,
    "x": 3,
    "y": 6
  },
  {
    "blue": 140,
    "green": 199,
    "red": 99,
    "x": 4,
    "y": 6
  },
  {
    "blue": 132,
    "green": 199,
    "red": 116,
    "x": 5,
    "y": 6
  },
  {
    "blue": 123,
    "green": 199,
    "red": 133,
    "x": 6,
    "y": 6
  },
  {
    "blue": 115,
    "green": 199,
    "red": 150,
    "x": 7,
    "y": 6
  },
  {
    "blue": 106,
    "green": 199,
    "red": 166,
    "x": 8,
    "y": 6
  },
  {
    "blue": 98,
    "green": 199,
    "red": 183,
    "x": 9,
    "y": 6
  },
  {
    "blue": 90,
    "green": 199,
    "red": 200,
    "x": 10,
    "y": 6
  },
  {
    "blue": 81,
    "green": 199,
    "red": 217,
    "x": 11,
    "y": 6
  },
  {
    "blue": 165,
    "green": 224,
    "red": 32,
    "x": 0,
    "y": 7
  },
  {
    "blue": 157,
    "green": 224,
    "red": 49,
    "x": 1,
    "y": 7
  },
  {
    "blue": 148,
    "green": 224,
    "red": 66,
    "x": 2,
    "y": 7
  },
  {
    "blue": 140,
    "green": 224,
    "red": 82,
    "x": 3,
    "y": 7
  },
  {
    "blue": 132,
    "green": 224,
    "red": 99,
    "x": 4,
    "y": 7
  },
  {
    "blue": 123,
    "green": 224,
    "red": 116,
    "x": 5,
    "y": 7
  },
  {
    "blue": 115,
    "green": 224,
    "red": 133,
    "x": 6,
    "y": 7
  },
  {
    "blue": 106,
    "green": 224,
    "red": 150,
    "x": 7,
    "y": 7
  },
  {
    "blue": 98,
    "green": 224,
    "red": 166,
    "x": 8,
    "y": 7
  },
  {
    "blue": 90,
    "green": 224,
    "red": 183,
    "x": 9,
    "y": 7
  },
  {
    "blue": 81,
    "green": 224,
    "red": 200,
    "x": 10,
    "y": 7
  },
  {
    "blue": 73,
    "green": 224,
    "red": 217,
    "x": 11,
    "y": 7
  }
];

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": "Raster image example"
  },
  "axes": {
    "x": {
      "format": {
        "type": "integer"
      },
      "labels": {
        "orientation": "horizontal"
      },
      "ticks": {
        "spacing": 8
      }
    },
    "y": {
      "format": {
        "type": "integer"
      },
      "labels": {
        "orientation": "horizontal"
      },
      "ticks": {
        "spacing": 8
      }
    }
  },
  "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": {
      "fields": [
        {
          "field": "x",
          "format": "number",
          "label": "X"
        },
        {
          "field": "y",
          "format": "number",
          "label": "Y"
        },
        {
          "field": "red",
          "format": "number",
          "label": "Red"
        },
        {
          "field": "green",
          "format": "number",
          "label": "Green"
        },
        {
          "field": "blue",
          "format": "number",
          "label": "Blue"
        }
      ],
      "title": "Raster image",
      "trigger": "mark"
    }
  },
  "locale": "en",
  "mark": {
    "fields": {
      "blue": "blue",
      "green": "green",
      "red": "red"
    }
  },
  "padding": {
    "top": 52
  },
  "theme": "graflume-light",
  "title": {
    "subtitle": "Raster image uses runnable data and options to demonstrate row RGB/RGBA or explicit color pixels; numeric and band coordinates.",
    "text": "Raster image"
  },
  "width": "container",
  "x": {
    "field": "x",
    "title": "Column",
    "type": "quantitative"
  },
  "y": {
    "field": "y",
    "title": "Row",
    "type": "quantitative"
  }
};

Graflume.image('#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": "Raster image example"
  },
  "axes": {
    "x": {
      "format": {
        "type": "integer"
      },
      "labels": {
        "orientation": "horizontal"
      },
      "ticks": {
        "spacing": 8
      }
    },
    "y": {
      "format": {
        "type": "integer"
      },
      "labels": {
        "orientation": "horizontal"
      },
      "ticks": {
        "spacing": 8
      }
    }
  },
  "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": {
      "fields": [
        {
          "field": "x",
          "format": "number",
          "label": "X"
        },
        {
          "field": "y",
          "format": "number",
          "label": "Y"
        },
        {
          "field": "red",
          "format": "number",
          "label": "Red"
        },
        {
          "field": "green",
          "format": "number",
          "label": "Green"
        },
        {
          "field": "blue",
          "format": "number",
          "label": "Blue"
        }
      ],
      "title": "Raster image",
      "trigger": "mark"
    }
  },
  "locale": "en",
  "mark": {
    "fields": {
      "blue": "blue",
      "green": "green",
      "red": "red"
    }
  },
  "padding": {
    "top": 52
  },
  "theme": "graflume-light",
  "title": {
    "subtitle": "Raster image uses runnable data and options to demonstrate row RGB/RGBA or explicit color pixels; numeric and band coordinates.",
    "text": "Raster image"
  },
  "width": "container",
  "x": {
    "field": "x",
    "title": "Column",
    "type": "quantitative"
  },
  "y": {
    "field": "y",
    "title": "Row",
    "type": "quantitative"
  }
}

Edge cases

Numeric range, irregular structure, and data volume

Exercise numeric range, sparse structure, and large inputs with valid data. Each tab materializes data only when needed and never silently repairs invalid values.

Wide numeric range

Mix zero, very small finite values, and very large finite values to verify automatic domains, precision, and stable geometry. NaN and Infinity remain intentionally invalid. It applies 2 data-integrity rules that preserve finite values and axis domains.

StatusLoading

  • extreme-range
  • color-channel-boundary
  • zero
  • domain-boundary
  • budget:marks<=6
Graflume.image() 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.image()

const data = [
  {
    "blue": 127,
    "green": 1,
    "red": 0,
    "x": 0,
    "y": 0
  },
  {
    "blue": 254,
    "green": 127,
    "red": 1,
    "x": 1,
    "y": 0
  },
  {
    "blue": 255,
    "green": 254,
    "red": 127,
    "x": 2,
    "y": 0
  },
  {
    "blue": 0,
    "green": 255,
    "red": 254,
    "x": 3,
    "y": 0
  },
  {
    "blue": 0,
    "green": 0,
    "red": 255,
    "x": 4,
    "y": 0
  },
  {
    "blue": 1,
    "green": 0,
    "red": 0,
    "x": 5,
    "y": 0
  }
];

const options = {
  "accessibility": {
    "description": "A smooth calibration raster demonstrates color and pixel inspection. The example uses curated, deterministic data and exposes its exact values in a semantic table.",
    "label": "Raster image"
  },
  "height": 620,
  "locale": "en",
  "mark": {
    "fields": {
      "blue": "blue",
      "green": "green",
      "red": "red"
    }
  },
  "title": {
    "subtitle": "edge case · range",
    "text": "Raster image"
  },
  "width": "container",
  "x": {
    "field": "x",
    "title": "Column",
    "type": "quantitative"
  },
  "y": {
    "field": "y",
    "title": "Row",
    "type": "quantitative"
  }
};

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

Portable schema

ChartSpec 0.1 · options

{
  "accessibility": {
    "description": "A smooth calibration raster demonstrates color and pixel inspection. The example uses curated, deterministic data and exposes its exact values in a semantic table.",
    "label": "Raster image"
  },
  "height": 620,
  "locale": "en",
  "mark": {
    "fields": {
      "blue": "blue",
      "green": "green",
      "red": "red"
    }
  },
  "title": {
    "subtitle": "edge case · range",
    "text": "Raster image"
  },
  "width": "container",
  "x": {
    "field": "x",
    "title": "Column",
    "type": "quantitative"
  },
  "y": {
    "field": "y",
    "title": "Row",
    "type": "quantitative"
  }
}

Extreme environments

Reconfigure for display, input, and device capability

Combine container size, input method, display capability, and user preference instead of guessing a device name. Compare mobile, watch, e-paper, monochrome, dot-matrix, and standards-based extreme environments on the same chart.

Fluid responsive

Reflow axes, legends, descriptions, and controls from the available container size.

960×540 · adaptive.profiles=responsive-fluid
  • zoom-reflow
  • shape-rectangle
  • display-color
  • input-fine
  • motion-full
  • renderer-canvas-spatial

Extreme environment preview

Choose a profile above to preserve the same data and ChartSpec while reconfiguring the chart for display size, input method, display capability, and user preference.

StatusLoading

  • adaptive
  • capability-driven
  • no-user-agent-branching
  • Legend: legend · explicit · 3 channels
  • Point and range highlights: highlights[] · datum · rowIndex
  • Custom callouts: annotations[] · datum · rowIndex · callout · placement:auto
  • Interactive selection: selection · multiple · toggle
Graflume.image() 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.image()

const data = [
  {
    "blue": 224,
    "green": 52,
    "red": 32,
    "x": 0,
    "y": 0
  },
  {
    "blue": 216,
    "green": 52,
    "red": 49,
    "x": 1,
    "y": 0
  },
  {
    "blue": 207,
    "green": 52,
    "red": 66,
    "x": 2,
    "y": 0
  },
  {
    "blue": 199,
    "green": 52,
    "red": 82,
    "x": 3,
    "y": 0
  },
  {
    "blue": 190,
    "green": 52,
    "red": 99,
    "x": 4,
    "y": 0
  },
  {
    "blue": 182,
    "green": 52,
    "red": 116,
    "x": 5,
    "y": 0
  },
  {
    "blue": 174,
    "green": 52,
    "red": 133,
    "x": 6,
    "y": 0
  },
  {
    "blue": 165,
    "green": 52,
    "red": 150,
    "x": 7,
    "y": 0
  },
  {
    "blue": 157,
    "green": 52,
    "red": 166,
    "x": 8,
    "y": 0
  },
  {
    "blue": 148,
    "green": 52,
    "red": 183,
    "x": 9,
    "y": 0
  },
  {
    "blue": 140,
    "green": 52,
    "red": 200,
    "x": 10,
    "y": 0
  },
  {
    "blue": 132,
    "green": 52,
    "red": 217,
    "x": 11,
    "y": 0
  },
  {
    "blue": 216,
    "green": 77,
    "red": 32,
    "x": 0,
    "y": 1
  },
  {
    "blue": 207,
    "green": 77,
    "red": 49,
    "x": 1,
    "y": 1
  },
  {
    "blue": 199,
    "green": 77,
    "red": 66,
    "x": 2,
    "y": 1
  },
  {
    "blue": 190,
    "green": 77,
    "red": 82,
    "x": 3,
    "y": 1
  },
  {
    "blue": 182,
    "green": 77,
    "red": 99,
    "x": 4,
    "y": 1
  },
  {
    "blue": 174,
    "green": 77,
    "red": 116,
    "x": 5,
    "y": 1
  },
  {
    "blue": 165,
    "green": 77,
    "red": 133,
    "x": 6,
    "y": 1
  },
  {
    "blue": 157,
    "green": 77,
    "red": 150,
    "x": 7,
    "y": 1
  },
  {
    "blue": 148,
    "green": 77,
    "red": 166,
    "x": 8,
    "y": 1
  },
  {
    "blue": 140,
    "green": 77,
    "red": 183,
    "x": 9,
    "y": 1
  },
  {
    "blue": 132,
    "green": 77,
    "red": 200,
    "x": 10,
    "y": 1
  },
  {
    "blue": 123,
    "green": 77,
    "red": 217,
    "x": 11,
    "y": 1
  },
  {
    "blue": 207,
    "green": 101,
    "red": 32,
    "x": 0,
    "y": 2
  },
  {
    "blue": 199,
    "green": 101,
    "red": 49,
    "x": 1,
    "y": 2
  },
  {
    "blue": 190,
    "green": 101,
    "red": 66,
    "x": 2,
    "y": 2
  },
  {
    "blue": 182,
    "green": 101,
    "red": 82,
    "x": 3,
    "y": 2
  },
  {
    "blue": 174,
    "green": 101,
    "red": 99,
    "x": 4,
    "y": 2
  },
  {
    "blue": 165,
    "green": 101,
    "red": 116,
    "x": 5,
    "y": 2
  },
  {
    "blue": 157,
    "green": 101,
    "red": 133,
    "x": 6,
    "y": 2
  },
  {
    "blue": 148,
    "green": 101,
    "red": 150,
    "x": 7,
    "y": 2
  },
  {
    "blue": 140,
    "green": 101,
    "red": 166,
    "x": 8,
    "y": 2
  },
  {
    "blue": 132,
    "green": 101,
    "red": 183,
    "x": 9,
    "y": 2
  },
  {
    "blue": 123,
    "green": 101,
    "red": 200,
    "x": 10,
    "y": 2
  },
  {
    "blue": 115,
    "green": 101,
    "red": 217,
    "x": 11,
    "y": 2
  },
  {
    "blue": 199,
    "green": 126,
    "red": 32,
    "x": 0,
    "y": 3
  },
  {
    "blue": 190,
    "green": 126,
    "red": 49,
    "x": 1,
    "y": 3
  },
  {
    "blue": 182,
    "green": 126,
    "red": 66,
    "x": 2,
    "y": 3
  },
  {
    "blue": 174,
    "green": 126,
    "red": 82,
    "x": 3,
    "y": 3
  },
  {
    "blue": 165,
    "green": 126,
    "red": 99,
    "x": 4,
    "y": 3
  },
  {
    "blue": 157,
    "green": 126,
    "red": 116,
    "x": 5,
    "y": 3
  },
  {
    "blue": 148,
    "green": 126,
    "red": 133,
    "x": 6,
    "y": 3
  },
  {
    "blue": 140,
    "green": 126,
    "red": 150,
    "x": 7,
    "y": 3
  },
  {
    "blue": 132,
    "green": 126,
    "red": 166,
    "x": 8,
    "y": 3
  },
  {
    "blue": 123,
    "green": 126,
    "red": 183,
    "x": 9,
    "y": 3
  },
  {
    "blue": 115,
    "green": 126,
    "red": 200,
    "x": 10,
    "y": 3
  },
  {
    "blue": 106,
    "green": 126,
    "red": 217,
    "x": 11,
    "y": 3
  },
  {
    "blue": 190,
    "green": 150,
    "red": 32,
    "x": 0,
    "y": 4
  },
  {
    "blue": 182,
    "green": 150,
    "red": 49,
    "x": 1,
    "y": 4
  },
  {
    "blue": 174,
    "green": 150,
    "red": 66,
    "x": 2,
    "y": 4
  },
  {
    "blue": 165,
    "green": 150,
    "red": 82,
    "x": 3,
    "y": 4
  },
  {
    "blue": 157,
    "green": 150,
    "red": 99,
    "x": 4,
    "y": 4
  },
  {
    "blue": 148,
    "green": 150,
    "red": 116,
    "x": 5,
    "y": 4
  },
  {
    "blue": 140,
    "green": 150,
    "red": 133,
    "x": 6,
    "y": 4
  },
  {
    "blue": 132,
    "green": 150,
    "red": 150,
    "x": 7,
    "y": 4
  },
  {
    "blue": 123,
    "green": 150,
    "red": 166,
    "x": 8,
    "y": 4
  },
  {
    "blue": 115,
    "green": 150,
    "red": 183,
    "x": 9,
    "y": 4
  },
  {
    "blue": 106,
    "green": 150,
    "red": 200,
    "x": 10,
    "y": 4
  },
  {
    "blue": 98,
    "green": 150,
    "red": 217,
    "x": 11,
    "y": 4
  },
  {
    "blue": 182,
    "green": 175,
    "red": 32,
    "x": 0,
    "y": 5
  },
  {
    "blue": 174,
    "green": 175,
    "red": 49,
    "x": 1,
    "y": 5
  },
  {
    "blue": 165,
    "green": 175,
    "red": 66,
    "x": 2,
    "y": 5
  },
  {
    "blue": 157,
    "green": 175,
    "red": 82,
    "x": 3,
    "y": 5
  },
  {
    "blue": 148,
    "green": 175,
    "red": 99,
    "x": 4,
    "y": 5
  },
  {
    "blue": 140,
    "green": 175,
    "red": 116,
    "x": 5,
    "y": 5
  },
  {
    "blue": 132,
    "green": 175,
    "red": 133,
    "x": 6,
    "y": 5
  },
  {
    "blue": 123,
    "green": 175,
    "red": 150,
    "x": 7,
    "y": 5
  },
  {
    "blue": 115,
    "green": 175,
    "red": 166,
    "x": 8,
    "y": 5
  },
  {
    "blue": 106,
    "green": 175,
    "red": 183,
    "x": 9,
    "y": 5
  },
  {
    "blue": 98,
    "green": 175,
    "red": 200,
    "x": 10,
    "y": 5
  },
  {
    "blue": 90,
    "green": 175,
    "red": 217,
    "x": 11,
    "y": 5
  },
  {
    "blue": 174,
    "green": 199,
    "red": 32,
    "x": 0,
    "y": 6
  },
  {
    "blue": 165,
    "green": 199,
    "red": 49,
    "x": 1,
    "y": 6
  },
  {
    "blue": 157,
    "green": 199,
    "red": 66,
    "x": 2,
    "y": 6
  },
  {
    "blue": 148,
    "green": 199,
    "red": 82,
    "x": 3,
    "y": 6
  },
  {
    "blue": 140,
    "green": 199,
    "red": 99,
    "x": 4,
    "y": 6
  },
  {
    "blue": 132,
    "green": 199,
    "red": 116,
    "x": 5,
    "y": 6
  },
  {
    "blue": 123,
    "green": 199,
    "red": 133,
    "x": 6,
    "y": 6
  },
  {
    "blue": 115,
    "green": 199,
    "red": 150,
    "x": 7,
    "y": 6
  },
  {
    "blue": 106,
    "green": 199,
    "red": 166,
    "x": 8,
    "y": 6
  },
  {
    "blue": 98,
    "green": 199,
    "red": 183,
    "x": 9,
    "y": 6
  },
  {
    "blue": 90,
    "green": 199,
    "red": 200,
    "x": 10,
    "y": 6
  },
  {
    "blue": 81,
    "green": 199,
    "red": 217,
    "x": 11,
    "y": 6
  },
  {
    "blue": 165,
    "green": 224,
    "red": 32,
    "x": 0,
    "y": 7
  },
  {
    "blue": 157,
    "green": 224,
    "red": 49,
    "x": 1,
    "y": 7
  },
  {
    "blue": 148,
    "green": 224,
    "red": 66,
    "x": 2,
    "y": 7
  },
  {
    "blue": 140,
    "green": 224,
    "red": 82,
    "x": 3,
    "y": 7
  },
  {
    "blue": 132,
    "green": 224,
    "red": 99,
    "x": 4,
    "y": 7
  },
  {
    "blue": 123,
    "green": 224,
    "red": 116,
    "x": 5,
    "y": 7
  },
  {
    "blue": 115,
    "green": 224,
    "red": 133,
    "x": 6,
    "y": 7
  },
  {
    "blue": 106,
    "green": 224,
    "red": 150,
    "x": 7,
    "y": 7
  },
  {
    "blue": 98,
    "green": 224,
    "red": 166,
    "x": 8,
    "y": 7
  },
  {
    "blue": 90,
    "green": 224,
    "red": 183,
    "x": 9,
    "y": 7
  },
  {
    "blue": 81,
    "green": 224,
    "red": 200,
    "x": 10,
    "y": 7
  },
  {
    "blue": 73,
    "green": 224,
    "red": 217,
    "x": 11,
    "y": 7
  }
];

const options = {
  "accessibility": {
    "description": "A smooth calibration raster demonstrates color and pixel inspection. The example uses curated, deterministic data and exposes its exact values in a semantic table.",
    "label": "Raster image: A smooth calibration raster demonstrates color and pixel inspection"
  },
  "annotations": [
    {
      "connector": {
        "visible": true
      },
      "detail": "Attach user-authored safe text to a datum, axis range, or normalized plot position.",
      "id": "manual-callout",
      "placement": "auto",
      "style": {
        "maxWidth": 220,
        "padding": 8
      },
      "target": {
        "rowIndex": 48,
        "type": "datum"
      },
      "text": "Point and range highlights · 0"
    }
  ],
  "axes": {
    "x": {
      "format": {
        "type": "integer"
      },
      "labels": {
        "orientation": "horizontal"
      },
      "ticks": {
        "spacing": 8
      }
    },
    "y": {
      "format": {
        "type": "integer"
      },
      "labels": {
        "orientation": "horizontal"
      },
      "ticks": {
        "spacing": 8
      }
    }
  },
  "create": {
    "adaptive": {
      "profiles": "auto"
    }
  },
  "height": 620,
  "highlights": [
    {
      "id": "manual-focus",
      "padding": 7,
      "target": {
        "rowIndex": 48,
        "type": "datum"
      }
    }
  ],
  "interaction": {
    "controls": {
      "annotations": true,
      "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"
    },
    "selection": {
      "ariaLabel": "Interactive selection",
      "clearOnBackground": true,
      "clearOnEscape": true,
      "highlight": {
        "padding": 5
      },
      "mode": "multiple",
      "toggle": true
    },
    "tooltip": {
      "fields": [
        {
          "field": "x",
          "format": "number",
          "label": "X"
        },
        {
          "field": "y",
          "format": "number",
          "label": "Y"
        },
        {
          "field": "red",
          "format": "number",
          "label": "Red"
        },
        {
          "field": "green",
          "format": "number",
          "label": "Green"
        },
        {
          "field": "blue",
          "format": "number",
          "label": "Blue"
        }
      ],
      "title": "Raster image",
      "trigger": "mark"
    }
  },
  "legend": {
    "interactive": false,
    "items": [
      {
        "id": "semantic-0",
        "label": "Red"
      },
      {
        "id": "semantic-1",
        "label": "Green"
      },
      {
        "id": "semantic-2",
        "label": "Blue"
      }
    ],
    "labels": {
      "hide": "Hide",
      "show": "Show"
    },
    "maxItems": 8,
    "mode": "layers",
    "orientation": "horizontal",
    "position": "bottom",
    "title": "Raster image",
    "visible": true
  },
  "locale": "en",
  "mark": {
    "fields": {
      "blue": "blue",
      "green": "green",
      "red": "red"
    }
  },
  "padding": {
    "top": 52
  },
  "theme": "graflume-light",
  "title": {
    "subtitle": "A smooth calibration raster demonstrates color and pixel inspection",
    "text": "Raster image"
  },
  "width": "container",
  "x": {
    "field": "x",
    "title": "Column",
    "type": "quantitative"
  },
  "y": {
    "field": "y",
    "title": "Row",
    "type": "quantitative"
  }
};

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

Portable schema

ChartSpec 0.1 · options

{
  "accessibility": {
    "description": "A smooth calibration raster demonstrates color and pixel inspection. The example uses curated, deterministic data and exposes its exact values in a semantic table.",
    "label": "Raster image: A smooth calibration raster demonstrates color and pixel inspection"
  },
  "annotations": [
    {
      "connector": {
        "visible": true
      },
      "detail": "Attach user-authored safe text to a datum, axis range, or normalized plot position.",
      "id": "manual-callout",
      "placement": "auto",
      "style": {
        "maxWidth": 220,
        "padding": 8
      },
      "target": {
        "rowIndex": 48,
        "type": "datum"
      },
      "text": "Point and range highlights · 0"
    }
  ],
  "axes": {
    "x": {
      "format": {
        "type": "integer"
      },
      "labels": {
        "orientation": "horizontal"
      },
      "ticks": {
        "spacing": 8
      }
    },
    "y": {
      "format": {
        "type": "integer"
      },
      "labels": {
        "orientation": "horizontal"
      },
      "ticks": {
        "spacing": 8
      }
    }
  },
  "create": {
    "adaptive": {
      "profiles": "auto"
    }
  },
  "height": 620,
  "highlights": [
    {
      "id": "manual-focus",
      "padding": 7,
      "target": {
        "rowIndex": 48,
        "type": "datum"
      }
    }
  ],
  "interaction": {
    "controls": {
      "annotations": true,
      "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"
    },
    "selection": {
      "ariaLabel": "Interactive selection",
      "clearOnBackground": true,
      "clearOnEscape": true,
      "highlight": {
        "padding": 5
      },
      "mode": "multiple",
      "toggle": true
    },
    "tooltip": {
      "fields": [
        {
          "field": "x",
          "format": "number",
          "label": "X"
        },
        {
          "field": "y",
          "format": "number",
          "label": "Y"
        },
        {
          "field": "red",
          "format": "number",
          "label": "Red"
        },
        {
          "field": "green",
          "format": "number",
          "label": "Green"
        },
        {
          "field": "blue",
          "format": "number",
          "label": "Blue"
        }
      ],
      "title": "Raster image",
      "trigger": "mark"
    }
  },
  "legend": {
    "interactive": false,
    "items": [
      {
        "id": "semantic-0",
        "label": "Red"
      },
      {
        "id": "semantic-1",
        "label": "Green"
      },
      {
        "id": "semantic-2",
        "label": "Blue"
      }
    ],
    "labels": {
      "hide": "Hide",
      "show": "Show"
    },
    "maxItems": 8,
    "mode": "layers",
    "orientation": "horizontal",
    "position": "bottom",
    "title": "Raster image",
    "visible": true
  },
  "locale": "en",
  "mark": {
    "fields": {
      "blue": "blue",
      "green": "green",
      "red": "red"
    }
  },
  "padding": {
    "top": 52
  },
  "theme": "graflume-light",
  "title": {
    "subtitle": "A smooth calibration raster demonstrates color and pixel inspection",
    "text": "Raster image"
  },
  "width": "container",
  "x": {
    "field": "x",
    "title": "Column",
    "type": "quantitative"
  },
  "y": {
    "field": "y",
    "title": "Row",
    "type": "quantitative"
  }
}

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.

1 modes · 0 compatibility identifiers

Raster image · supported modes · representative image
IDNameQuick APImodemarkrenderer
imageRaster imageimage()defaultimagecanvas

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.