Graflume · Alpha

Carpet · Chart-specific features

Warp a logical coordinate grid through supplied physical positions and overlay points or contours on that surface. These tabs come from Graflume's public catalog. Every mode owns runnable data, options, a Quick API, and source-backed feature claims.

Chart family · Advanced families

Carpet

Warp a logical coordinate grid through supplied physical positions and overlay points or contours on that surface.

Quick API
carpet()
Browser snapshot
graflume/complete
mark
carpet
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.

Carpet chart

Carpet chart uses runnable data and options to demonstrate explicit logical and projected coordinates; logical axis ticks and labels.

StatusLoading

  • carpet
  • explicit logical and projected coordinates
  • logical axis ticks and labels
Graflume.carpet() 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.carpet()

const data = [
  {
    "a": 0,
    "b": 0,
    "px": 0,
    "py": 0,
    "value": 18.454
  },
  {
    "a": 1,
    "b": 0,
    "px": 1,
    "py": 0.161,
    "value": 25.566
  },
  {
    "a": 2,
    "b": 0,
    "px": 2,
    "py": 0.279,
    "value": 33.429
  },
  {
    "a": 3,
    "b": 0,
    "px": 3,
    "py": 0.333,
    "value": 37.437
  },
  {
    "a": 4,
    "b": 0,
    "px": 4,
    "py": 0.334,
    "value": 34.696
  },
  {
    "a": 5,
    "b": 0,
    "px": 5,
    "py": 0.317,
    "value": 27.231
  },
  {
    "a": 6,
    "b": 0,
    "px": 6,
    "py": 0.33,
    "value": 19.709
  },
  {
    "a": 7,
    "b": 0,
    "px": 7,
    "py": 0.402,
    "value": 14.966
  },
  {
    "a": 8,
    "b": 0,
    "px": 8,
    "py": 0.535,
    "value": 12.882
  },
  {
    "a": 0,
    "b": 1,
    "px": 0.237,
    "py": 1,
    "value": 23.107
  },
  {
    "a": 1,
    "b": 1,
    "px": 1.237,
    "py": 1.161,
    "value": 35.347
  },
  {
    "a": 2,
    "b": 1,
    "px": 2.237,
    "py": 1.279,
    "value": 48.878
  },
  {
    "a": 3,
    "b": 1,
    "px": 3.237,
    "py": 1.333,
    "value": 55.784
  },
  {
    "a": 4,
    "b": 1,
    "px": 4.237,
    "py": 1.334,
    "value": 51.103
  },
  {
    "a": 5,
    "b": 1,
    "px": 5.237,
    "py": 1.317,
    "value": 38.364
  },
  {
    "a": 6,
    "b": 1,
    "px": 6.237,
    "py": 1.33,
    "value": 25.59
  },
  {
    "a": 7,
    "b": 1,
    "px": 7.237,
    "py": 1.402,
    "value": 17.544
  },
  {
    "a": 8,
    "b": 1,
    "px": 8.237,
    "py": 1.535,
    "value": 13.904
  },
  {
    "a": 0,
    "b": 2,
    "px": 0.44,
    "py": 2,
    "value": 26.364
  },
  {
    "a": 1,
    "b": 2,
    "px": 1.44,
    "py": 2.161,
    "value": 42.193
  },
  {
    "a": 2,
    "b": 2,
    "px": 2.44,
    "py": 2.279,
    "value": 59.698
  },
  {
    "a": 3,
    "b": 2,
    "px": 3.44,
    "py": 2.333,
    "value": 68.668
  },
  {
    "a": 4,
    "b": 2,
    "px": 4.44,
    "py": 2.334,
    "value": 62.805
  },
  {
    "a": 5,
    "b": 2,
    "px": 5.44,
    "py": 2.317,
    "value": 46.879
  },
  {
    "a": 6,
    "b": 2,
    "px": 6.44,
    "py": 2.33,
    "value": 31.246
  },
  {
    "a": 7,
    "b": 2,
    "px": 7.44,
    "py": 2.402,
    "value": 21.451
  },
  {
    "a": 8,
    "b": 2,
    "px": 8.44,
    "py": 2.535,
    "value": 16.459
  },
  {
    "a": 0,
    "b": 3,
    "px": 0.594,
    "py": 3,
    "value": 25.96
  },
  {
    "a": 1,
    "b": 3,
    "px": 1.594,
    "py": 3.161,
    "value": 41.344
  },
  {
    "a": 2,
    "b": 3,
    "px": 2.594,
    "py": 3.279,
    "value": 58.373
  },
  {
    "a": 3,
    "b": 3,
    "px": 3.594,
    "py": 3.333,
    "value": 67.222
  },
  {
    "a": 4,
    "b": 3,
    "px": 4.594,
    "py": 3.334,
    "value": 62.151
  },
  {
    "a": 5,
    "b": 3,
    "px": 5.594,
    "py": 3.317,
    "value": 48.474
  },
  {
    "a": 6,
    "b": 3,
    "px": 6.594,
    "py": 3.33,
    "value": 36.19
  },
  {
    "a": 7,
    "b": 3,
    "px": 7.594,
    "py": 3.402,
    "value": 28.674
  },
  {
    "a": 8,
    "b": 3,
    "px": 8.594,
    "py": 3.535,
    "value": 22.887
  },
  {
    "a": 0,
    "b": 4,
    "px": 0.715,
    "py": 4,
    "value": 22.195
  },
  {
    "a": 1,
    "b": 4,
    "px": 1.715,
    "py": 4.161,
    "value": 33.433
  },
  {
    "a": 2,
    "b": 4,
    "px": 2.715,
    "py": 4.279,
    "value": 45.905
  },
  {
    "a": 3,
    "b": 4,
    "px": 3.715,
    "py": 4.333,
    "value": 52.641
  },
  {
    "a": 4,
    "b": 4,
    "px": 4.715,
    "py": 4.334,
    "value": 50.238
  },
  {
    "a": 5,
    "b": 4,
    "px": 5.715,
    "py": 4.317,
    "value": 43.99
  },
  {
    "a": 6,
    "b": 4,
    "px": 6.715,
    "py": 4.33,
    "value": 41.06
  },
  {
    "a": 7,
    "b": 4,
    "px": 7.715,
    "py": 4.402,
    "value": 39.729
  },
  {
    "a": 8,
    "b": 4,
    "px": 8.715,
    "py": 4.535,
    "value": 33.562
  },
  {
    "a": 0,
    "b": 5,
    "px": 0.839,
    "py": 5,
    "value": 17.595
  },
  {
    "a": 1,
    "b": 5,
    "px": 1.839,
    "py": 5.161,
    "value": 23.767
  },
  {
    "a": 2,
    "b": 5,
    "px": 2.839,
    "py": 5.279,
    "value": 30.658
  },
  {
    "a": 3,
    "b": 5,
    "px": 3.839,
    "py": 5.333,
    "value": 34.711
  },
  {
    "a": 4,
    "b": 5,
    "px": 4.839,
    "py": 5.334,
    "value": 35.092
  },
  {
    "a": 5,
    "b": 5,
    "px": 5.839,
    "py": 5.317,
    "value": 36.552
  },
  {
    "a": 6,
    "b": 5,
    "px": 6.839,
    "py": 5.33,
    "value": 42.841
  },
  {
    "a": 7,
    "b": 5,
    "px": 7.839,
    "py": 5.402,
    "value": 47.546
  },
  {
    "a": 8,
    "b": 5,
    "px": 8.839,
    "py": 5.535,
    "value": 41.624
  },
  {
    "a": 0,
    "b": 6,
    "px": 1,
    "py": 6,
    "value": 14.308
  },
  {
    "a": 1,
    "b": 6,
    "px": 2,
    "py": 6.161,
    "value": 16.856
  },
  {
    "a": 2,
    "b": 6,
    "px": 3,
    "py": 6.279,
    "value": 19.736
  },
  {
    "a": 3,
    "b": 6,
    "px": 4,
    "py": 6.333,
    "value": 21.699
  },
  {
    "a": 4,
    "b": 6,
    "px": 5,
    "py": 6.334,
    "value": 23.244
  },
  {
    "a": 5,
    "b": 6,
    "px": 6,
    "py": 6.317,
    "value": 27.839
  },
  {
    "a": 6,
    "b": 6,
    "px": 7,
    "py": 6.33,
    "value": 36.881
  },
  {
    "a": 7,
    "b": 6,
    "px": 8,
    "py": 6.402,
    "value": 43.259
  },
  {
    "a": 8,
    "b": 6,
    "px": 9,
    "py": 6.535,
    "value": 38.745
  }
];

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": "Carpet example"
  },
  "axes": {
    "x": false,
    "y": false
  },
  "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": "a",
          "format": "number",
          "label": "A"
        },
        {
          "field": "b",
          "format": "number",
          "label": "B"
        },
        {
          "field": "px",
          "format": "number",
          "label": "Px"
        },
        {
          "field": "py",
          "format": "number",
          "label": "Py"
        },
        {
          "field": "value",
          "format": "number",
          "label": "Value"
        }
      ],
      "title": "Carpet",
      "trigger": "mark"
    }
  },
  "locale": "en",
  "mark": {
    "fields": {
      "value": "value",
      "x": "px",
      "y": "py"
    },
    "options": {
      "levels": 4,
      "mode": "grid"
    }
  },
  "padding": {
    "top": 52
  },
  "theme": "graflume-light",
  "title": {
    "subtitle": "Carpet chart uses runnable data and options to demonstrate explicit logical and projected coordinates; logical axis ticks and labels.",
    "text": "Carpet"
  },
  "width": "container",
  "x": {
    "field": "a",
    "title": "Carpet axis A",
    "type": "quantitative"
  },
  "y": {
    "field": "b",
    "title": "Carpet axis B",
    "type": "quantitative"
  }
};

Graflume.carpet('#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": "Carpet example"
  },
  "axes": {
    "x": false,
    "y": false
  },
  "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": "a",
          "format": "number",
          "label": "A"
        },
        {
          "field": "b",
          "format": "number",
          "label": "B"
        },
        {
          "field": "px",
          "format": "number",
          "label": "Px"
        },
        {
          "field": "py",
          "format": "number",
          "label": "Py"
        },
        {
          "field": "value",
          "format": "number",
          "label": "Value"
        }
      ],
      "title": "Carpet",
      "trigger": "mark"
    }
  },
  "locale": "en",
  "mark": {
    "fields": {
      "value": "value",
      "x": "px",
      "y": "py"
    },
    "options": {
      "levels": 4,
      "mode": "grid"
    }
  },
  "padding": {
    "top": 52
  },
  "theme": "graflume-light",
  "title": {
    "subtitle": "Carpet chart uses runnable data and options to demonstrate explicit logical and projected coordinates; logical axis ticks and labels.",
    "text": "Carpet"
  },
  "width": "container",
  "x": {
    "field": "a",
    "title": "Carpet axis A",
    "type": "quantitative"
  },
  "y": {
    "field": "b",
    "title": "Carpet axis B",
    "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 · 0 compatibility identifiers

Carpet · supported modes · representative carpet
IDNameQuick APImodemarkrenderer
carpetCarpet chartcarpet()defaultcarpetcanvas
carpet-scatterCarpet scatter overlaycarpetScatter()scattercarpetcanvas
carpet-contourCarpet contour overlaycarpetContour()contourcarpetcanvas

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.