Graflume · Alpha
Heatmap · Extreme-environment application
Encode intensity for two categorical dimensions as a nearly continuous color matrix. 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 · Advanced families
Heatmap
Encode intensity for two categorical dimensions as a nearly continuous color matrix.
- Quick API
heatmap()- Browser snapshot
graflume/complete- mark
heatmap- Presets
- 2
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-fluidzoom-reflowshape-rectangledisplay-colorinput-finemotion-fullrenderer-canvas-spatial
Mobile
Prioritize 44px touch targets, tap tooltips, and collapsed secondary information on a narrow portrait screen.
390×844 · adaptive.profiles=mobile-touchzoom-reflowcoarse-touchvirtual-keyboardshape-rectangledisplay-colorinput-coarsemotion-fullrenderer-canvas-spatial
Smartwatch
Keep essential marks, values, and stepped controls on a tiny or round screen, with the remaining detail reflowed below.
184×224 · adaptive.profiles=smartwatchzoom-reflowreduced-effectscoarse-touchlow-resourcecutout-roundshape-rounddisplay-colorinput-coarsemotion-reducedrenderer-canvas-spatialviewport-tiny
E-book and e-paper
Prefer stable frames, strong contrast, and the data table for low-refresh e-paper displays.
758×1024 · adaptive.profiles=ebook-paperprint-pagedreduced-effectslow-resourceshape-pageddisplay-e-inkinput-keyboardmotion-staticrenderer-canvas-spatial
Monochrome
Use strokes, markers, patterns, labels, and the table so color is never the only distinction.
640×400 · adaptive.profiles=monochromereduced-effectsshape-rectangledisplay-monochromeinput-finemotion-reducedrenderer-canvas-spatial
Dot-matrix display
Reduce decoration and mark density while using strong strokes, integer labels, and stepped zoom on a low-resolution display.
320×240 · adaptive.profiles=dot-matrixzoom-reflowreduced-effectskeyboard-switchlow-resourceshape-rectangledisplay-gridinput-keyboardmotion-staticrenderer-canvas-spatialviewport-tiny
400% zoom and reflow
Reflow prose to one dimension at the 320 CSS px equivalent while retaining chart-local zoom and pan.
320×480 · adaptive.profiles=zoom-reflowzoom-reflowshape-rectangledisplay-colorinput-finemotion-fullrenderer-canvas-spatial
Foldable dual screen
Keep the chart and explanation in independent viewport segments without crossing the hinge.
720×640 · adaptive.profiles=foldable-dualfoldable-dualshape-dualdisplay-colorinput-finemotion-fullrenderer-canvas-spatial
TV and remote
Provide strong focus indication and D-pad, Enter, and Escape operation on a hoverless distance display.
1920×1080 · adaptive.profiles=tv-remotetv-remoteshape-rectangledisplay-colorinput-remotemotion-fullrenderer-canvas-spatial
Print and paged media
Pair a static chart with its description and table, hide controls, and avoid page breaks through the figure.
794×1123 · adaptive.profiles=print-pagedprint-pagedshape-pageddisplay-colorinput-finemotion-staticrenderer-canvas-spatial
Forced colors
Honor system colors and borders while retaining patterns, markers, and text as redundant cues.
640×400 · adaptive.profiles=forced-colorsforced-colorsshape-rectangledisplay-high-contrastinput-finemotion-fullrenderer-canvas-spatial
Reduced effects
Complete transitions immediately and use opaque surfaces and deferred work to reduce motion and transparency load.
640×400 · adaptive.profiles=reduced-effectsreduced-effectsshape-rectangledisplay-colorinput-finemotion-reducedrenderer-canvas-spatial
Coarse touch
Inspect values by tap without hover, keep targets at least 44px, and expose explicit zoom buttons.
390×844 · adaptive.profiles=coarse-touchcoarse-touchshape-rectangledisplay-colorinput-coarsemotion-fullrenderer-canvas-spatial
Keyboard and switch input
Reach every operation with Tab, arrows, Enter, Space, and Escape, with no drag-only action.
640×400 · adaptive.profiles=keyboard-switchkeyboard-switchshape-rectangledisplay-colorinput-keyboardmotion-fullrenderer-canvas-spatial
Low resource and slow network
Prefer progressive rendering, sampling, cancellable work, and a static fallback under constrained memory or connectivity.
640×400 · adaptive.profiles=low-resourcelow-resourceshape-rectangledisplay-colorinput-finemotion-fullrenderer-canvas-spatial
RTL document
Follow RTL logical flow for prose and tabs while keeping axes, code, and data identifiers in technical LTR order.
640×400 · adaptive.profiles=rtlrtlshape-rectangledisplay-colorinput-finemotion-fullrenderer-canvas-spatial
Vertical writing
Reflow vertical prose while keeping the chart and technical surfaces in an independent horizontal panel.
640×400 · adaptive.profiles=vertical-writingvertical-writingshape-rectangledisplay-colorinput-finemotion-fullrenderer-canvas-spatial
Ultrawide and projection
Cap chart width instead of stretching indefinitely, using panelization and readable labels on ultrawide or projected surfaces.
1920×720 · adaptive.profiles=ultrawide-projectionultrawide-projectionshape-rectangledisplay-colorinput-finemotion-fullrenderer-canvas-spatial
Screen reader and braille
Provide short and long descriptions, a semantic table, and status so Canvas or color is never the sole information path.
640×400 · adaptive.profiles=screenreader-braillescreenreader-brailleshape-nonvisualdisplay-colorinput-nonvisualmotion-fullrenderer-canvas-spatial
No scripting
A verified static preview, description, and collapsible row-data table preserve the essential information when scripting is unavailable.
640×400 · adaptive.profiles=no-scriptno-scriptshape-nonvisualdisplay-colorinput-finemotion-staticrenderer-static-fallback
XR and see-through display
Fall back safely to the ordinary 2D or WebGL panel when XR APIs are absent, duplicating depth cues in text and the table.
640×400 · adaptive.profiles=spatial-xrspatial-xrshape-rectangledisplay-colorinput-finemotion-fullrenderer-canvas-spatial
Cutout and round display
Inset titles, marks, and controls around safe areas and round display bounds so they are not clipped.
184×224 · adaptive.profiles=cutout-roundcutout-roundshape-rounddisplay-colorinput-finemotion-fullrenderer-canvas-spatialviewport-tiny
Virtual keyboard viewport
Reflow focus controls, the chart, and the active explanation when a virtual keyboard reduces the visual viewport.
390×560 · adaptive.profiles=virtual-keyboardvirtual-keyboardshape-rectangledisplay-colorinput-finemotion-fullrenderer-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
adaptivecapability-drivenno-user-agent-branching
- Legend:
legend · continuous · value - Point and range highlights:
highlights[] · datum · rowIndex - Custom callouts:
annotations[] · datum · rowIndex · callout · placement:auto - Interactive selection:
selection · multiple · toggle
Loading
Extreme environment preview · Row data
Row data and zero-copy TypedArray columns share one data contract.
xquantitative | yquantitative |
|---|---|
| 0 | 0 |
| 1 | 0 |
| 2 | 0 |
| 3 | 0 |
| 4 | 0 |
| 5 | 0 |
| 6 | 0 |
| 7 | 0 |
| 8 | 0 |
| 9 | 0 |
| 10 | 0 |
| 11 | 0 |
| 0 | 1 |
| 1 | 1 |
| 2 | 1 |
| 3 | 1 |
| 4 | 1 |
| 5 | 1 |
| 6 | 1 |
| 7 | 1 |
| 8 | 1 |
| 9 | 1 |
| 10 | 1 |
| 11 | 1 |
| 0 | 2 |
| 1 | 2 |
| 2 | 2 |
| 3 | 2 |
| 4 | 2 |
| 5 | 2 |
| 6 | 2 |
| 7 | 2 |
| 8 | 2 |
| 9 | 2 |
| 10 | 2 |
| 11 | 2 |
| 0 | 3 |
| 1 | 3 |
| 2 | 3 |
| 3 | 3 |
| 4 | 3 |
| 5 | 3 |
| 6 | 3 |
| 7 | 3 |
| 8 | 3 |
| 9 | 3 |
| 10 | 3 |
| 11 | 3 |
| 0 | 4 |
| 1 | 4 |
| 2 | 4 |
| 3 | 4 |
| 4 | 4 |
| 5 | 4 |
| 6 | 4 |
| 7 | 4 |
| 8 | 4 |
| 9 | 4 |
| 10 | 4 |
| 11 | 4 |
| 0 | 5 |
| 1 | 5 |
| 2 | 5 |
| 3 | 5 |
| 4 | 5 |
| 5 | 5 |
| 6 | 5 |
| 7 | 5 |
| 8 | 5 |
| 9 | 5 |
| 10 | 5 |
| 11 | 5 |
| 0 | 6 |
| 1 | 6 |
| 2 | 6 |
| 3 | 6 |
| 4 | 6 |
| 5 | 6 |
| 6 | 6 |
| 7 | 6 |
| 8 | 6 |
| 9 | 6 |
| 10 | 6 |
| 11 | 6 |
| 0 | 7 |
| 1 | 7 |
| 2 | 7 |
| 3 | 7 |
| 4 | 7 |
| 5 | 7 |
| 6 | 7 |
| 7 | 7 |
| 8 | 7 |
| 9 | 7 |
| 10 | 7 |
| 11 | 7 |
Browser API · Portable schema
Browser API
Graflume.heatmap()
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": "Two hotspots and a diagonal ridge form a purposeful density landscape. The example uses curated, deterministic data and exposes its exact values in a semantic table.",
"label": "Heatmap: Two hotspots and a diagonal ridge form a purposeful density landscape"
},
"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": {
"rowIndex": 48,
"type": "datum"
},
"text": "Point and range highlights · 0"
}
],
"axes": {
"x": {
"labels": {
"orientation": "horizontal",
"padding": 6
},
"ticks": {
"spacing": 4
}
},
"y": {
"labels": {
"orientation": "horizontal",
"padding": 6
},
"ticks": {
"spacing": 4
}
}
},
"create": {
"adaptive": {
"profiles": "auto"
}
},
"height": 620,
"highlights": [
{
"id": "manual-focus",
"padding": 7,
"target": {
"rowIndex": 48,
"type": "datum"
}
}
],
"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": false,
"reset": true,
"zoom": true
},
"hover": true,
"navigation": {
"drag": true,
"keyboard": true,
"maxZoom": 6,
"minZoom": 1,
"pinch": true,
"wheel": "modifier"
},
"selection": {
"ariaLabel": "Interactive selection",
"clearOnBackground": true,
"clearOnEscape": true,
"highlight": {
"padding": 5
},
"mode": "multiple",
"toggle": true
},
"tooltip": {
"fields": [
{
"field": "x",
"format": "number",
"label": "X"
},
{
"field": "y",
"format": "number",
"label": "Y"
}
],
"title": "Heatmap",
"trigger": "mark"
}
},
"legend": {
"field": "value",
"interactive": false,
"labels": {
"hide": "Hide",
"show": "Show"
},
"maxItems": 8,
"mode": "continuous",
"orientation": "horizontal",
"position": "bottom",
"title": "Value",
"visible": true
},
"locale": "en",
"padding": {
"top": 52
},
"theme": "graflume-light",
"title": {
"subtitle": "Two hotspots and a diagonal ridge form a purposeful density landscape",
"text": "Heatmap"
},
"width": "container",
"x": {
"field": "x",
"title": "Horizontal bin",
"type": "quantitative"
},
"y": {
"field": "y",
"title": "Vertical bin",
"type": "quantitative"
}
};
Graflume.heatmap('#chart', data, options);Portable schema
ChartSpec 0.1 · options
{
"accessibility": {
"description": "Two hotspots and a diagonal ridge form a purposeful density landscape. The example uses curated, deterministic data and exposes its exact values in a semantic table.",
"label": "Heatmap: Two hotspots and a diagonal ridge form a purposeful density landscape"
},
"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": {
"rowIndex": 48,
"type": "datum"
},
"text": "Point and range highlights · 0"
}
],
"axes": {
"x": {
"labels": {
"orientation": "horizontal",
"padding": 6
},
"ticks": {
"spacing": 4
}
},
"y": {
"labels": {
"orientation": "horizontal",
"padding": 6
},
"ticks": {
"spacing": 4
}
}
},
"create": {
"adaptive": {
"profiles": "auto"
}
},
"height": 620,
"highlights": [
{
"id": "manual-focus",
"padding": 7,
"target": {
"rowIndex": 48,
"type": "datum"
}
}
],
"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": false,
"reset": true,
"zoom": true
},
"hover": true,
"navigation": {
"drag": true,
"keyboard": true,
"maxZoom": 6,
"minZoom": 1,
"pinch": true,
"wheel": "modifier"
},
"selection": {
"ariaLabel": "Interactive selection",
"clearOnBackground": true,
"clearOnEscape": true,
"highlight": {
"padding": 5
},
"mode": "multiple",
"toggle": true
},
"tooltip": {
"fields": [
{
"field": "x",
"format": "number",
"label": "X"
},
{
"field": "y",
"format": "number",
"label": "Y"
}
],
"title": "Heatmap",
"trigger": "mark"
}
},
"legend": {
"field": "value",
"interactive": false,
"labels": {
"hide": "Hide",
"show": "Show"
},
"maxItems": 8,
"mode": "continuous",
"orientation": "horizontal",
"position": "bottom",
"title": "Value",
"visible": true
},
"locale": "en",
"padding": {
"top": 52
},
"theme": "graflume-light",
"title": {
"subtitle": "Two hotspots and a diagonal ridge form a purposeful density landscape",
"text": "Heatmap"
},
"width": "container",
"x": {
"field": "x",
"title": "Horizontal bin",
"type": "quantitative"
},
"y": {
"field": "y",
"title": "Vertical bin",
"type": "quantitative"
}
}