Graflume · Alpha

Annotation · Chart-specific features

Place important events and explanatory labels directly on a time series. 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

Annotation

Place important events and explanatory labels directly on a time series.

Quick API
annotation()
Browser snapshot
graflume
mark
annotation
Presets
3

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.

Annotation chart

Annotation chart uses runnable data and options to demonstrate datum/layer/range/plot targets; runtime CRUD.

StatusLoading

  • annotation
  • datum/layer/range/plot targets
  • runtime CRUD
  • keyboard authoring
Graflume.annotation() 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.annotation()

const data = [
  {
    "annotation": null,
    "date": "2026-01-01",
    "value": 48
  },
  {
    "annotation": null,
    "date": "2026-02-01",
    "value": 53
  },
  {
    "annotation": "Spring release",
    "date": "2026-03-01",
    "value": 51
  },
  {
    "annotation": null,
    "date": "2026-04-01",
    "value": 59
  },
  {
    "annotation": null,
    "date": "2026-05-01",
    "value": 66
  },
  {
    "annotation": null,
    "date": "2026-06-01",
    "value": 70
  },
  {
    "annotation": null,
    "date": "2026-07-01",
    "value": 76
  },
  {
    "annotation": null,
    "date": "2026-08-01",
    "value": 82
  },
  {
    "annotation": "Team plan launch",
    "date": "2026-09-01",
    "value": 80
  },
  {
    "annotation": null,
    "date": "2026-10-01",
    "value": 89
  },
  {
    "annotation": null,
    "date": "2026-11-01",
    "value": 96
  },
  {
    "annotation": null,
    "date": "2026-12-01",
    "value": 104
  }
];

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": "Annotation example"
  },
  "axes": {
    "x": {
      "format": {
        "dateStyle": "medium",
        "timeZone": "UTC",
        "type": "date"
      },
      "labels": {
        "orientation": "horizontal"
      },
      "position": "bottom",
      "ticks": {
        "count": 4,
        "spacing": 8
      }
    },
    "y": {
      "format": {
        "type": "integer"
      }
    }
  },
  "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": [
        {
          "dateStyle": "long",
          "field": "date",
          "format": "date",
          "label": "Date",
          "timeZone": "UTC"
        },
        {
          "field": "value",
          "format": "number",
          "label": "Value"
        },
        {
          "field": "annotation",
          "format": "auto",
          "label": "Annotation"
        }
      ],
      "title": "Annotation",
      "trigger": "axis"
    }
  },
  "locale": "en",
  "mark": {
    "fields": {
      "annotation": "annotation"
    },
    "point": true
  },
  "padding": {
    "top": 52
  },
  "theme": "graflume-light",
  "title": {
    "subtitle": "Annotation chart uses runnable data and options to demonstrate datum/layer/range/plot targets; runtime CRUD.",
    "text": "Annotation"
  },
  "width": "container",
  "x": {
    "field": "date",
    "title": "Month",
    "type": "temporal"
  },
  "y": {
    "field": "value",
    "title": "Active teams",
    "type": "quantitative"
  }
};

Graflume.annotation('#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": "Annotation example"
  },
  "axes": {
    "x": {
      "format": {
        "dateStyle": "medium",
        "timeZone": "UTC",
        "type": "date"
      },
      "labels": {
        "orientation": "horizontal"
      },
      "position": "bottom",
      "ticks": {
        "count": 4,
        "spacing": 8
      }
    },
    "y": {
      "format": {
        "type": "integer"
      }
    }
  },
  "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": [
        {
          "dateStyle": "long",
          "field": "date",
          "format": "date",
          "label": "Date",
          "timeZone": "UTC"
        },
        {
          "field": "value",
          "format": "number",
          "label": "Value"
        },
        {
          "field": "annotation",
          "format": "auto",
          "label": "Annotation"
        }
      ],
      "title": "Annotation",
      "trigger": "axis"
    }
  },
  "locale": "en",
  "mark": {
    "fields": {
      "annotation": "annotation"
    },
    "point": true
  },
  "padding": {
    "top": 52
  },
  "theme": "graflume-light",
  "title": {
    "subtitle": "Annotation chart uses runnable data and options to demonstrate datum/layer/range/plot targets; runtime CRUD.",
    "text": "Annotation"
  },
  "width": "container",
  "x": {
    "field": "date",
    "title": "Month",
    "type": "temporal"
  },
  "y": {
    "field": "value",
    "title": "Active teams",
    "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.

3 modes · 1 compatibility identifiers

Annotation · supported modes · representative annotation
IDNameQuick APImodemarkrenderer
annotationAnnotation chartannotation()defaultannotationcanvas
annotated-timelineAnnotated timelineannotatedTimeline()timelineannotationcanvas
event-flagsEvent flagseventFlags()event-flagsflagscanvas
Annotation · compatibility identifiers
IdentifierCanonical mode ID
flagsevent-flags

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.