Graflume · Alpha
Heatmap · Edge-case application
Encode intensity for two categorical dimensions as a nearly continuous color matrix. Exercise numeric range, sparse structure, and large inputs with valid data. Each tab materializes data only when needed and never silently repairs invalid values.
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
Edge cases
Numeric range, irregular structure, and data volume
Exercise numeric range, sparse structure, and large inputs with valid data. Each tab materializes data only when needed and never silently repairs invalid values.
Wide numeric range
Mix zero, very small finite values, and very large finite values to verify automatic domains, precision, and stable geometry. NaN and Infinity remain intentionally invalid. It applies 2 data-integrity rules that preserve finite values and axis domains.
StatusLoading
extreme-rangeextreme-smallextreme-largezeromixed-signbudget:marks<=6
Loading
Wide numeric range · Row data
Row data and zero-copy TypedArray columns share one data contract.
xquantitative | yquantitative | valuequantitative |
|---|---|---|
| 0 | 0 | -1e+12 |
| 1 | 0 | -1e-09 |
| 2 | 0 | 0 |
| 3 | 0 | 1e+12 |
| 4 | 0 | 1e-09 |
| 5 | 0 | 1e+06 |
Browser API · Portable schema
Browser API
Graflume.heatmap()
const data = [
{
"value": -1000000000000,
"x": 0,
"y": 0
},
{
"value": -1e-9,
"x": 1,
"y": 0
},
{
"value": 0,
"x": 2,
"y": 0
},
{
"value": 1000000000000,
"x": 3,
"y": 0
},
{
"value": 1e-9,
"x": 4,
"y": 0
},
{
"value": 1000000,
"x": 5,
"y": 0
}
];
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"
},
"height": 620,
"locale": "en",
"title": {
"subtitle": "edge case · range",
"text": "Heatmap"
},
"width": "container",
"x": {
"field": "x",
"title": "Horizontal bin",
"type": "quantitative"
},
"y": {
"field": "y",
"scale": {
"constant": 1,
"type": "symlog"
},
"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"
},
"height": 620,
"locale": "en",
"title": {
"subtitle": "edge case · range",
"text": "Heatmap"
},
"width": "container",
"x": {
"field": "x",
"title": "Horizontal bin",
"type": "quantitative"
},
"y": {
"field": "y",
"scale": {
"constant": 1,
"type": "symlog"
},
"title": "Vertical bin",
"type": "quantitative"
}
}Sparse and irregular structure
Exercise only duplicate, missing, sparse, or out-of-order structures whose meaning is defined for this family. Broken references and malformed tuples are never disguised as successful examples. It applies 3 structural rules that preserve the meaning of missing, duplicate, and ordered values.
StatusLoading
irregular-structuresparseduplicate-cellout-of-ordernullbudget:marks<=7
Loading
Sparse and irregular structure · Row data
Row data and zero-copy TypedArray columns share one data contract.
xquantitative | yquantitative | valuequantitative |
|---|---|---|
| 2 | 0 | 30.375 |
| 0 | 0 | — |
| 2 | 0 | 30.375 |
| 3 | 0 | 35.875 |
| 4 | 0 | 35.843 |
| 5 | 0 | 29.381 |
| 1 | 0 | 23.692 |
Browser API · Portable schema
Browser API
Graflume.heatmap()
const data = [
{
"value": 30.375,
"x": 2,
"y": 0
},
{
"value": null,
"x": 0,
"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": 23.692,
"x": 1,
"y": 0
}
];
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 · Sparse and irregular structure"
},
"height": 620,
"locale": "en",
"title": {
"subtitle": "edge case · structure",
"text": "Heatmap · Sparse and irregular structure"
},
"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 · Sparse and irregular structure"
},
"height": 620,
"locale": "en",
"title": {
"subtitle": "edge case · structure",
"text": "Heatmap · Sparse and irregular structure"
},
"width": "container",
"x": {
"field": "x",
"title": "Horizontal bin",
"type": "quantitative"
},
"y": {
"field": "y",
"title": "Vertical bin",
"type": "quantitative"
}
}High data volume
Materialize a deterministic compact recipe only when this tab opens. Graflume's performance profile bounds mark count, hit testing, and animation work for the input size. It applies 6 high-volume rules for deterministic generation and bounded output. This family materializes 65,536 logical cells and bounds rendered bar marks at 12,000.
StatusLoading
high-row-cardinalityall-input-rows-generatedall-input-rows-processeddeterministic-generationbounded-renderinginput:65536zoom-pan-resetbudget:bar-marks<=12000
- Legend:
legend · continuous · value - Point and range highlights:
highlights[] · datum · x - Custom callouts:
annotations[] · datum · x · callout · placement:auto
Loading
Browser API · Portable schema
Browser API
Graflume.heatmap()
const recipe = {
"cardinality": {
"axes": {
"columns": 256,
"rows": 256
},
"sourceRows": 65536,
"unit": "cells"
},
"expectedInvariants": [
"finite-json",
"stable-grid-coordinate"
],
"id": "grid-2d",
"initialView": {
"kind": "domain",
"zoom": 1
},
"outputBudget": {
"maximum": 12000,
"resource": "bar-marks"
},
"parameters": {
"columns": 256,
"family": "heatmap",
"nullableFields": [
"value"
],
"positiveFields": [],
"rows": 256,
"scenario": "volume",
"valueFields": [
"value"
],
"valuePolicy": "signed"
},
"preview": {
"maximumRows": 12,
"method": "spatial-slice"
},
"reduction": {
"method": "area-weighted-grid-downsample",
"stage": "level-of-detail"
},
"seed": 286073701,
"shape": "rows",
"version": 2
};
const { data, previewRows, plan } = Graflume.materializeDemoRecipe(recipe);
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": "Heatmap · High data volume"
},
"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": "x",
"type": "datum",
"value": -0.49153
},
"text": "Point and range highlights · -0.49153"
}
],
"create": {
"adaptive": {
"environment": {
"rowCount": 65536
},
"largeDataNavigation": true,
"profiles": "auto"
}
},
"height": 620,
"highlights": [
{
"id": "manual-focus",
"padding": 7,
"target": {
"field": "x",
"type": "datum",
"value": -0.49153
}
}
],
"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": "Heatmap · High data volume",
"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
},
"performance": "auto",
"theme": "graflume-light",
"title": {
"subtitle": "Two hotspots and a diagonal ridge form a purposeful density landscape · 65,536 logical rows, screen-aware detail",
"text": "Heatmap · High data volume"
},
"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": "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": "Heatmap · High data volume"
},
"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": "x",
"type": "datum",
"value": -0.49153
},
"text": "Point and range highlights · -0.49153"
}
],
"create": {
"adaptive": {
"environment": {
"rowCount": 65536
},
"largeDataNavigation": true,
"profiles": "auto"
}
},
"height": 620,
"highlights": [
{
"id": "manual-focus",
"padding": 7,
"target": {
"field": "x",
"type": "datum",
"value": -0.49153
}
}
],
"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": "Heatmap · High data volume",
"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
},
"performance": "auto",
"theme": "graflume-light",
"title": {
"subtitle": "Two hotspots and a diagonal ridge form a purposeful density landscape · 65,536 logical rows, screen-aware detail",
"text": "Heatmap · High data volume"
},
"width": "container",
"x": {
"field": "x",
"title": "Horizontal bin",
"type": "quantitative"
},
"y": {
"field": "y",
"title": "Vertical bin",
"type": "quantitative"
}
}