Graflume · Alpha

Contour · Chart-specific features

Represent a scalar grid with filled levels and deterministic contour lines. These tabs come from Graflume's public catalog. Every mode owns runnable data, options, a Quick API, and source-backed feature claims.

Chart family · Specialized families

Contour

Represent a scalar grid with filled levels and deterministic contour lines.

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

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.

Contour chart

Contour chart uses runnable data and options to demonstrate deterministic regular-grid marching-squares isolines; explicit, linear and Type-7 quantile thresholds.

StatusLoading

  • contour
  • deterministic regular-grid marching-squares isolines
  • explicit, linear and Type-7 quantile thresholds
  • threshold-relative asymptotic saddle decider with explicit high/low policies
  • null-cell holes and bounded extraction
  • shared canonical, bivariate and carpet extractor
  • optional threshold-colored cells
  • filled and banded contours with polygon-hole topology
  • triangulated irregular samples
  • smoothing
Graflume.contour() 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.contour()

const data = [
  {
    "value": 19.342,
    "x": 0,
    "y": 0
  },
  {
    "value": 23.692,
    "x": 1,
    "y": 0
  },
  {
    "value": 30.375,
    "x": 2,
    "y": 0
  },
  {
    "value": 35.875,
    "x": 3,
    "y": 0
  },
  {
    "value": 35.843,
    "x": 4,
    "y": 0
  },
  {
    "value": 29.381,
    "x": 5,
    "y": 0
  },
  {
    "value": 19.872,
    "x": 6,
    "y": 0
  },
  {
    "value": 11.62,
    "x": 7,
    "y": 0
  },
  {
    "value": 6.6,
    "x": 8,
    "y": 0
  },
  {
    "value": 4.304,
    "x": 9,
    "y": 0
  },
  {
    "value": 3.445,
    "x": 10,
    "y": 0
  },
  {
    "value": 3.145,
    "x": 11,
    "y": 0
  },
  {
    "value": 26.5,
    "x": 0,
    "y": 1
  },
  {
    "value": 39.914,
    "x": 1,
    "y": 1
  },
  {
    "value": 53.905,
    "x": 2,
    "y": 1
  },
  {
    "value": 62.722,
    "x": 3,
    "y": 1
  },
  {
    "value": 60.939,
    "x": 4,
    "y": 1
  },
  {
    "value": 48.629,
    "x": 5,
    "y": 1
  },
  {
    "value": 32.011,
    "x": 6,
    "y": 1
  },
  {
    "value": 18.177,
    "x": 7,
    "y": 1
  },
  {
    "value": 10.033,
    "x": 8,
    "y": 1
  },
  {
    "value": 6.276,
    "x": 9,
    "y": 1
  },
  {
    "value": 4.575,
    "x": 10,
    "y": 1
  },
  {
    "value": 3.674,
    "x": 11,
    "y": 1
  },
  {
    "value": 23.721,
    "x": 0,
    "y": 2
  },
  {
    "value": 44.273,
    "x": 1,
    "y": 2
  },
  {
    "value": 68.463,
    "x": 2,
    "y": 2
  },
  {
    "value": 85.571,
    "x": 3,
    "y": 2
  },
  {
    "value": 85.778,
    "x": 4,
    "y": 2
  },
  {
    "value": 69.134,
    "x": 5,
    "y": 2
  },
  {
    "value": 45.848,
    "x": 6,
    "y": 2
  },
  {
    "value": 27.125,
    "x": 7,
    "y": 2
  },
  {
    "value": 16.847,
    "x": 8,
    "y": 2
  },
  {
    "value": 11.918,
    "x": 9,
    "y": 2
  },
  {
    "value": 8.491,
    "x": 10,
    "y": 2
  },
  {
    "value": 5.65,
    "x": 11,
    "y": 2
  },
  {
    "value": 20.436,
    "x": 0,
    "y": 3
  },
  {
    "value": 39.635,
    "x": 1,
    "y": 3
  },
  {
    "value": 64.15,
    "x": 2,
    "y": 3
  },
  {
    "value": 84.275,
    "x": 3,
    "y": 3
  },
  {
    "value": 89.407,
    "x": 4,
    "y": 3
  },
  {
    "value": 77.438,
    "x": 5,
    "y": 3
  },
  {
    "value": 57.334,
    "x": 6,
    "y": 3
  },
  {
    "value": 40.924,
    "x": 7,
    "y": 3
  },
  {
    "value": 32.23,
    "x": 8,
    "y": 3
  },
  {
    "value": 26.345,
    "x": 9,
    "y": 3
  },
  {
    "value": 18.692,
    "x": 10,
    "y": 3
  },
  {
    "value": 10.778,
    "x": 11,
    "y": 3
  },
  {
    "value": 16.946,
    "x": 0,
    "y": 4
  },
  {
    "value": 31.996,
    "x": 1,
    "y": 4
  },
  {
    "value": 50.804,
    "x": 2,
    "y": 4
  },
  {
    "value": 65.794,
    "x": 3,
    "y": 4
  },
  {
    "value": 69.629,
    "x": 4,
    "y": 4
  },
  {
    "value": 62.612,
    "x": 5,
    "y": 4
  },
  {
    "value": 53.611,
    "x": 6,
    "y": 4
  },
  {
    "value": 51.41,
    "x": 7,
    "y": 4
  },
  {
    "value": 54.19,
    "x": 8,
    "y": 4
  },
  {
    "value": 51.132,
    "x": 9,
    "y": 4
  },
  {
    "value": 37.392,
    "x": 10,
    "y": 4
  },
  {
    "value": 20.559,
    "x": 11,
    "y": 4
  },
  {
    "value": 12.113,
    "x": 0,
    "y": 5
  },
  {
    "value": 21.902,
    "x": 1,
    "y": 5
  },
  {
    "value": 34.001,
    "x": 2,
    "y": 5
  },
  {
    "value": 43.3,
    "x": 3,
    "y": 5
  },
  {
    "value": 45.061,
    "x": 4,
    "y": 5
  },
  {
    "value": 40.583,
    "x": 5,
    "y": 5
  },
  {
    "value": 38.468,
    "x": 6,
    "y": 5
  },
  {
    "value": 46.908,
    "x": 7,
    "y": 5
  },
  {
    "value": 61.621,
    "x": 8,
    "y": 5
  },
  {
    "value": 66.662,
    "x": 9,
    "y": 5
  },
  {
    "value": 53.82,
    "x": 10,
    "y": 5
  },
  {
    "value": 32.705,
    "x": 11,
    "y": 5
  },
  {
    "value": 7.715,
    "x": 0,
    "y": 6
  },
  {
    "value": 12.779,
    "x": 1,
    "y": 6
  },
  {
    "value": 19.035,
    "x": 2,
    "y": 6
  },
  {
    "value": 23.839,
    "x": 3,
    "y": 6
  },
  {
    "value": 24.834,
    "x": 4,
    "y": 6
  },
  {
    "value": 23.214,
    "x": 5,
    "y": 6
  },
  {
    "value": 24.759,
    "x": 6,
    "y": 6
  },
  {
    "value": 34.859,
    "x": 7,
    "y": 6
  },
  {
    "value": 49.474,
    "x": 8,
    "y": 6
  },
  {
    "value": 55.699,
    "x": 9,
    "y": 6
  },
  {
    "value": 47.461,
    "x": 10,
    "y": 6
  },
  {
    "value": 32.902,
    "x": 11,
    "y": 6
  },
  {
    "value": 4.928,
    "x": 0,
    "y": 7
  },
  {
    "value": 7,
    "x": 1,
    "y": 7
  },
  {
    "value": 9.559,
    "x": 2,
    "y": 7
  },
  {
    "value": 11.538,
    "x": 3,
    "y": 7
  },
  {
    "value": 12.049,
    "x": 4,
    "y": 7
  },
  {
    "value": 11.892,
    "x": 5,
    "y": 7
  },
  {
    "value": 14.112,
    "x": 6,
    "y": 7
  },
  {
    "value": 21.319,
    "x": 7,
    "y": 7
  },
  {
    "value": 30.492,
    "x": 8,
    "y": 7
  },
  {
    "value": 33.608,
    "x": 9,
    "y": 7
  },
  {
    "value": 27.669,
    "x": 10,
    "y": 7
  },
  {
    "value": 19.134,
    "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": "Contour example"
  },
  "axes": {
    "x": {
      "format": {
        "fractionDigits": 1,
        "type": "number"
      },
      "ticks": {
        "values": [
          0,
          1,
          2,
          3
        ]
      }
    },
    "y": {
      "format": {
        "fractionDigits": 1,
        "type": "number"
      },
      "ticks": {
        "values": [
          0,
          1,
          2
        ]
      }
    }
  },
  "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": "value",
          "format": "number",
          "label": "Value"
        }
      ],
      "title": "Contour",
      "trigger": "mark"
    }
  },
  "locale": "en",
  "mark": {
    "fields": {
      "value": "value"
    }
  },
  "padding": {
    "top": 52
  },
  "theme": "graflume-light",
  "title": {
    "subtitle": "Contour chart uses runnable data and options to demonstrate deterministic regular-grid marching-squares isolines; explicit, linear and Type-7 quantile thresholds.",
    "text": "Contour"
  },
  "width": "container",
  "x": {
    "field": "x",
    "title": "Horizontal bin",
    "type": "quantitative"
  },
  "y": {
    "field": "y",
    "title": "Vertical bin",
    "type": "quantitative"
  }
};

Graflume.contour('#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": "Contour example"
  },
  "axes": {
    "x": {
      "format": {
        "fractionDigits": 1,
        "type": "number"
      },
      "ticks": {
        "values": [
          0,
          1,
          2,
          3
        ]
      }
    },
    "y": {
      "format": {
        "fractionDigits": 1,
        "type": "number"
      },
      "ticks": {
        "values": [
          0,
          1,
          2
        ]
      }
    }
  },
  "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": "value",
          "format": "number",
          "label": "Value"
        }
      ],
      "title": "Contour",
      "trigger": "mark"
    }
  },
  "locale": "en",
  "mark": {
    "fields": {
      "value": "value"
    }
  },
  "padding": {
    "top": 52
  },
  "theme": "graflume-light",
  "title": {
    "subtitle": "Contour chart uses runnable data and options to demonstrate deterministic regular-grid marching-squares isolines; explicit, linear and Type-7 quantile thresholds.",
    "text": "Contour"
  },
  "width": "container",
  "x": {
    "field": "x",
    "title": "Horizontal bin",
    "type": "quantitative"
  },
  "y": {
    "field": "y",
    "title": "Vertical bin",
    "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 · 1 compatibility identifiers

Contour · supported modes · representative contour
IDNameQuick APImodemarkrenderer
contourContour chartcontour()defaultcontourcanvas
Contour · compatibility identifiers
IdentifierCanonical mode ID
contourcontour

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.