Graflume · Alpha

Annotation · Extreme-environment application

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

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

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 · layers · one series
  • Point and range highlights: highlights[] · datum · date
  • Custom callouts: annotations[] · datum · date · callout · placement:auto
  • Interactive selection: selection · multiple · toggle
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.

Playback smoothly interpolates matching stable keys for 600 ms with ease-in-out. Entering or exiting marks fade, incompatible shapes crossfade, and reduced-motion jumps directly to the final state.

playback · cumulative · date · key=date · transition=600ms/ease-in-out · fade/crossfade

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": "Monthly active teams with the releases that changed adoption. The example uses curated, deterministic data and exposes its exact values in a semantic table.",
    "label": "Annotation chart: Monthly active teams with the releases that changed adoption"
  },
  "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": {
        "field": "date",
        "type": "datum",
        "value": "2026-07-01"
      },
      "text": "Point and range highlights · 2026-07-01"
    }
  ],
  "axes": {
    "x": {
      "format": {
        "dateStyle": "medium",
        "timeZone": "UTC",
        "type": "date"
      },
      "labels": {
        "orientation": "horizontal"
      },
      "position": "bottom",
      "ticks": {
        "count": 4,
        "spacing": 8
      }
    },
    "y": {
      "format": {
        "type": "integer"
      }
    }
  },
  "create": {
    "adaptive": {
      "profiles": "auto"
    }
  },
  "height": 620,
  "highlights": [
    {
      "id": "manual-focus",
      "padding": 7,
      "target": {
        "field": "date",
        "type": "datum",
        "value": "2026-07-01"
      }
    }
  ],
  "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": true,
      "reset": true,
      "zoom": true
    },
    "hover": true,
    "navigation": {
      "drag": true,
      "keyboard": true,
      "maxZoom": 6,
      "minZoom": 1,
      "pinch": true,
      "wheel": "modifier"
    },
    "playback": {
      "autoplay": false,
      "field": "date",
      "filter": true,
      "interval": 1000,
      "key": "date",
      "loop": false,
      "mode": "cumulative",
      "rate": 1,
      "transition": {
        "duration": 600,
        "easing": "ease-in-out"
      },
      "windowSize": 1
    },
    "selection": {
      "ariaLabel": "Interactive selection",
      "clearOnBackground": true,
      "clearOnEscape": true,
      "highlight": {
        "padding": 5
      },
      "key": "date",
      "mode": "multiple",
      "toggle": true
    },
    "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"
    }
  },
  "legend": {
    "interactive": true,
    "items": [
      {
        "id": "series",
        "label": "Annotation",
        "layerId": "layer-0"
      }
    ],
    "labels": {
      "hide": "Hide",
      "show": "Show"
    },
    "maxItems": 8,
    "mode": "layers",
    "orientation": "horizontal",
    "position": "bottom",
    "title": "Annotation",
    "visible": true
  },
  "locale": "en",
  "mark": {
    "fields": {
      "annotation": "annotation"
    },
    "point": true
  },
  "padding": {
    "top": 52
  },
  "theme": "graflume-light",
  "title": {
    "subtitle": "Monthly active teams with the releases that changed adoption",
    "text": "Annotation chart"
  },
  "width": "container",
  "x": {
    "field": "date",
    "scale": {
      "domain": [
        "2026-01-01",
        "2026-04-01"
      ]
    },
    "title": "Month",
    "type": "temporal"
  },
  "y": {
    "field": "value",
    "scale": {
      "domain": [
        0,
        48
      ]
    },
    "title": "Active teams",
    "type": "quantitative"
  }
};

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

Portable schema

ChartSpec 0.1 · options

{
  "accessibility": {
    "description": "Monthly active teams with the releases that changed adoption. The example uses curated, deterministic data and exposes its exact values in a semantic table.",
    "label": "Annotation chart: Monthly active teams with the releases that changed adoption"
  },
  "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": {
        "field": "date",
        "type": "datum",
        "value": "2026-07-01"
      },
      "text": "Point and range highlights · 2026-07-01"
    }
  ],
  "axes": {
    "x": {
      "format": {
        "dateStyle": "medium",
        "timeZone": "UTC",
        "type": "date"
      },
      "labels": {
        "orientation": "horizontal"
      },
      "position": "bottom",
      "ticks": {
        "count": 4,
        "spacing": 8
      }
    },
    "y": {
      "format": {
        "type": "integer"
      }
    }
  },
  "create": {
    "adaptive": {
      "profiles": "auto"
    }
  },
  "height": 620,
  "highlights": [
    {
      "id": "manual-focus",
      "padding": 7,
      "target": {
        "field": "date",
        "type": "datum",
        "value": "2026-07-01"
      }
    }
  ],
  "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": true,
      "reset": true,
      "zoom": true
    },
    "hover": true,
    "navigation": {
      "drag": true,
      "keyboard": true,
      "maxZoom": 6,
      "minZoom": 1,
      "pinch": true,
      "wheel": "modifier"
    },
    "playback": {
      "autoplay": false,
      "field": "date",
      "filter": true,
      "interval": 1000,
      "key": "date",
      "loop": false,
      "mode": "cumulative",
      "rate": 1,
      "transition": {
        "duration": 600,
        "easing": "ease-in-out"
      },
      "windowSize": 1
    },
    "selection": {
      "ariaLabel": "Interactive selection",
      "clearOnBackground": true,
      "clearOnEscape": true,
      "highlight": {
        "padding": 5
      },
      "key": "date",
      "mode": "multiple",
      "toggle": true
    },
    "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"
    }
  },
  "legend": {
    "interactive": true,
    "items": [
      {
        "id": "series",
        "label": "Annotation",
        "layerId": "layer-0"
      }
    ],
    "labels": {
      "hide": "Hide",
      "show": "Show"
    },
    "maxItems": 8,
    "mode": "layers",
    "orientation": "horizontal",
    "position": "bottom",
    "title": "Annotation",
    "visible": true
  },
  "locale": "en",
  "mark": {
    "fields": {
      "annotation": "annotation"
    },
    "point": true
  },
  "padding": {
    "top": 52
  },
  "theme": "graflume-light",
  "title": {
    "subtitle": "Monthly active teams with the releases that changed adoption",
    "text": "Annotation chart"
  },
  "width": "container",
  "x": {
    "field": "date",
    "scale": {
      "domain": [
        "2026-01-01",
        "2026-04-01"
      ]
    },
    "title": "Month",
    "type": "temporal"
  },
  "y": {
    "field": "value",
    "scale": {
      "domain": [
        0,
        48
      ]
    },
    "title": "Active teams",
    "type": "quantitative"
  }
}