Graflume · Alpha

Table · Basic implementation · Common features

Render rows and columns as a Scene table for exact-value comparison. 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

Table

Render rows and columns as a Scene table for exact-value comparison.

Quick API
table()
Browser snapshot
graflume
mark
table
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

Render rows and columns as a Scene table for exact-value comparison.

StatusLoading

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

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 = {
  "height": 620,
  "locale": "en",
  "mark": {
    "options": {
      "columns": [
        "category",
        "value",
        "target",
        "previous"
      ]
    }
  },
  "width": "container",
  "x": {
    "field": "category",
    "title": "Capability",
    "type": "ordinal"
  },
  "y": {
    "field": "value",
    "title": "Current value",
    "type": "quantitative"
  }
};

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

Portable schema

ChartSpec 0.1 · options

{
  "height": 620,
  "locale": "en",
  "mark": {
    "options": {
      "columns": [
        "category",
        "value",
        "target",
        "previous"
      ]
    }
  },
  "width": "container",
  "x": {
    "field": "category",
    "title": "Capability",
    "type": "ordinal"
  },
  "y": {
    "field": "value",
    "title": "Current value",
    "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.table() 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.table()

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 = {
  "height": 620,
  "locale": "en",
  "mark": {
    "options": {
      "columns": [
        "category",
        "value",
        "target",
        "previous"
      ]
    }
  },
  "title": {
    "subtitle": "Table chart uses runnable data and options to demonstrate Canvas header and cells; declarative column layout and locale-aware formatting.",
    "text": "Table"
  },
  "width": "container",
  "x": {
    "field": "category",
    "title": "Capability",
    "type": "ordinal"
  },
  "y": {
    "field": "value",
    "title": "Current value",
    "type": "quantitative"
  }
};

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

Portable schema

ChartSpec 0.1 · options

{
  "height": 620,
  "locale": "en",
  "mark": {
    "options": {
      "columns": [
        "category",
        "value",
        "target",
        "previous"
      ]
    }
  },
  "title": {
    "subtitle": "Table chart uses runnable data and options to demonstrate Canvas header and cells; declarative column layout and locale-aware formatting.",
    "text": "Table"
  },
  "width": "container",
  "x": {
    "field": "category",
    "title": "Capability",
    "type": "ordinal"
  },
  "y": {
    "field": "value",
    "title": "Current value",
    "type": "quantitative"
  }
}