Bubble
Use position and bubble size to explore three numeric measures.
Bubble
The smallest runnable chart
Explore the chart and its data table. Open the code below to use this example.
Basic example
Loading
Basic example · Row data
Row data and zero-copy TypedArray columns share one data contract.
xquantitative | yquantitative | sizequantitative | groupordinal |
|---|---|---|---|
| 14 | 38 | 28 | Starter |
| 20 | 45 | 34 | Starter |
| 25 | 41 | 31 | Starter |
| 38 | 57 | 64 | Growth |
| 45 | 63 | 78 | Growth |
| 50 | 55 | 70 | Growth |
| 64 | 72 | 112 | Scale |
| 72 | 79 | 128 | Scale |
| 78 | 70 | 118 | Scale |
| 61 | 88 | 52 | Opportunity |
View code and settings
Browser API
Graflume.bubble()
const data = [
{
"group": "Starter",
"name": "Atlas Lab",
"size": 28,
"x": 14,
"y": 38,
"z": 7
},
{
"group": "Starter",
"name": "Beacon Co",
"size": 34,
"x": 20,
"y": 45,
"z": 10
},
{
"group": "Starter",
"name": "Civic Data",
"size": 31,
"x": 25,
"y": 41,
"z": 12
},
{
"group": "Growth",
"name": "Delta Ops",
"size": 64,
"x": 38,
"y": 57,
"z": 15
},
{
"group": "Growth",
"name": "Ember Labs",
"size": 78,
"x": 45,
"y": 63,
"z": 18
},
{
"group": "Growth",
"name": "Foundry BI",
"size": 70,
"x": 50,
"y": 55,
"z": 21
},
{
"group": "Scale",
"name": "Harbor AI",
"size": 112,
"x": 64,
"y": 72,
"z": 25
},
{
"group": "Scale",
"name": "Lattice Co",
"size": 128,
"x": 72,
"y": 79,
"z": 28
},
{
"group": "Scale",
"name": "Meridian",
"size": 118,
"x": 78,
"y": 70,
"z": 31
},
{
"group": "Opportunity",
"name": "Northstar",
"size": 52,
"x": 61,
"y": 88,
"z": 34
}
];
const options = {
"height": 620,
"locale": "en",
"mark": {
"fields": {
"color": "group",
"size": "size"
}
},
"width": "container",
"x": {
"field": "x",
"title": "Engagement score",
"type": "quantitative"
},
"y": {
"field": "y",
"title": "Satisfaction score",
"type": "quantitative"
}
};
Graflume.bubble('#chart', data, options);Portable schema
ChartSpec 0.1 · options
{
"height": 620,
"locale": "en",
"mark": {
"fields": {
"color": "group",
"size": "size"
}
},
"width": "container",
"x": {
"field": "x",
"title": "Engagement score",
"type": "quantitative"
},
"y": {
"field": "y",
"title": "Satisfaction score",
"type": "quantitative"
}
}- Quick API
bubble()- Browser snapshot
graflume- mark
bubble- Presets
- 2
minimal-implementation
Common features
Features shared by every chart
Use the tabs to compare header, tooltip, theme, legend, highlight, callout, selection, view controls, and accessibility one feature at a time. Hover over a data mark. On supported charts, move the pointer along the axis to see the nearest value. All exact values are available in the table below.
Header
Add a chart title and supporting description inside the visualization.
Loading
Header · Row data
Row data and zero-copy TypedArray columns share one data contract.
xquantitative | yquantitative | sizequantitative | groupordinal |
|---|---|---|---|
| 14 | 38 | 28 | Starter |
| 20 | 45 | 34 | Starter |
| 25 | 41 | 31 | Starter |
| 38 | 57 | 64 | Growth |
| 45 | 63 | 78 | Growth |
| 50 | 55 | 70 | Growth |
| 64 | 72 | 112 | Scale |
| 72 | 79 | 128 | Scale |
| 78 | 70 | 118 | Scale |
| 61 | 88 | 52 | Opportunity |
View code and settings
Browser API
Graflume.bubble()
const data = [
{
"group": "Starter",
"name": "Atlas Lab",
"size": 28,
"x": 14,
"y": 38,
"z": 7
},
{
"group": "Starter",
"name": "Beacon Co",
"size": 34,
"x": 20,
"y": 45,
"z": 10
},
{
"group": "Starter",
"name": "Civic Data",
"size": 31,
"x": 25,
"y": 41,
"z": 12
},
{
"group": "Growth",
"name": "Delta Ops",
"size": 64,
"x": 38,
"y": 57,
"z": 15
},
{
"group": "Growth",
"name": "Ember Labs",
"size": 78,
"x": 45,
"y": 63,
"z": 18
},
{
"group": "Growth",
"name": "Foundry BI",
"size": 70,
"x": 50,
"y": 55,
"z": 21
},
{
"group": "Scale",
"name": "Harbor AI",
"size": 112,
"x": 64,
"y": 72,
"z": 25
},
{
"group": "Scale",
"name": "Lattice Co",
"size": 128,
"x": 72,
"y": 79,
"z": 28
},
{
"group": "Scale",
"name": "Meridian",
"size": 118,
"x": 78,
"y": 70,
"z": 31
},
{
"group": "Opportunity",
"name": "Northstar",
"size": 52,
"x": 61,
"y": 88,
"z": 34
}
];
const options = {
"height": 620,
"locale": "en",
"mark": {
"fields": {
"color": "group",
"size": "size"
}
},
"title": {
"subtitle": "Bubble chart uses runnable data and options to demonstrate square-root radius; color field.",
"text": "Bubble"
},
"width": "container",
"x": {
"field": "x",
"title": "Engagement score",
"type": "quantitative"
},
"y": {
"field": "y",
"title": "Satisfaction score",
"type": "quantitative"
}
};
Graflume.bubble('#chart', data, options);Portable schema
ChartSpec 0.1 · options
{
"height": 620,
"locale": "en",
"mark": {
"fields": {
"color": "group",
"size": "size"
}
},
"title": {
"subtitle": "Bubble chart uses runnable data and options to demonstrate square-root radius; color field.",
"text": "Bubble"
},
"width": "container",
"x": {
"field": "x",
"title": "Engagement score",
"type": "quantitative"
},
"y": {
"field": "y",
"title": "Satisfaction score",
"type": "quantitative"
}
}header
Tooltip
Reveal exact values from a mark or axis position. Authors can choose locale-aware date/time styles and a time zone with declarative options.
Loading
Tooltip · Row data
Row data and zero-copy TypedArray columns share one data contract.
xquantitative | yquantitative | sizequantitative | groupordinal |
|---|---|---|---|
| 14 | 38 | 28 | Starter |
| 20 | 45 | 34 | Starter |
| 25 | 41 | 31 | Starter |
| 38 | 57 | 64 | Growth |
| 45 | 63 | 78 | Growth |
| 50 | 55 | 70 | Growth |
| 64 | 72 | 112 | Scale |
| 72 | 79 | 128 | Scale |
| 78 | 70 | 118 | Scale |
| 61 | 88 | 52 | Opportunity |
View code and settings
Browser API
Graflume.bubble()
const data = [
{
"group": "Starter",
"name": "Atlas Lab",
"size": 28,
"x": 14,
"y": 38,
"z": 7
},
{
"group": "Starter",
"name": "Beacon Co",
"size": 34,
"x": 20,
"y": 45,
"z": 10
},
{
"group": "Starter",
"name": "Civic Data",
"size": 31,
"x": 25,
"y": 41,
"z": 12
},
{
"group": "Growth",
"name": "Delta Ops",
"size": 64,
"x": 38,
"y": 57,
"z": 15
},
{
"group": "Growth",
"name": "Ember Labs",
"size": 78,
"x": 45,
"y": 63,
"z": 18
},
{
"group": "Growth",
"name": "Foundry BI",
"size": 70,
"x": 50,
"y": 55,
"z": 21
},
{
"group": "Scale",
"name": "Harbor AI",
"size": 112,
"x": 64,
"y": 72,
"z": 25
},
{
"group": "Scale",
"name": "Lattice Co",
"size": 128,
"x": 72,
"y": 79,
"z": 28
},
{
"group": "Scale",
"name": "Meridian",
"size": 118,
"x": 78,
"y": 70,
"z": 31
},
{
"group": "Opportunity",
"name": "Northstar",
"size": 52,
"x": 61,
"y": 88,
"z": 34
}
];
const options = {
"height": 620,
"interaction": {
"hover": true,
"tooltip": {
"fields": [
{
"field": "x",
"format": "number",
"label": "X"
},
{
"field": "y",
"format": "number",
"label": "Y"
},
{
"field": "size",
"format": "number",
"label": "Size"
},
{
"field": "group",
"format": "auto",
"label": "Group"
}
],
"title": "Bubble · Tooltip",
"trigger": "mark"
}
},
"locale": "en",
"mark": {
"fields": {
"color": "group",
"size": "size"
}
},
"width": "container",
"x": {
"field": "x",
"title": "Engagement score",
"type": "quantitative"
},
"y": {
"field": "y",
"title": "Satisfaction score",
"type": "quantitative"
}
};
Graflume.bubble('#chart', data, options);Portable schema
ChartSpec 0.1 · options
{
"height": 620,
"interaction": {
"hover": true,
"tooltip": {
"fields": [
{
"field": "x",
"format": "number",
"label": "X"
},
{
"field": "y",
"format": "number",
"label": "Y"
},
{
"field": "size",
"format": "number",
"label": "Size"
},
{
"field": "group",
"format": "auto",
"label": "Group"
}
],
"title": "Bubble · Tooltip",
"trigger": "mark"
}
},
"locale": "en",
"mark": {
"fields": {
"color": "group",
"size": "size"
}
},
"width": "container",
"x": {
"field": "x",
"title": "Engagement score",
"type": "quantitative"
},
"y": {
"field": "y",
"title": "Satisfaction score",
"type": "quantitative"
}
}tooltip
Theme
Apply the current built-in theme from the selector and update every active example together.
Loading
Theme · Row data
Row data and zero-copy TypedArray columns share one data contract.
xquantitative | yquantitative | sizequantitative | groupordinal |
|---|---|---|---|
| 14 | 38 | 28 | Starter |
| 20 | 45 | 34 | Starter |
| 25 | 41 | 31 | Starter |
| 38 | 57 | 64 | Growth |
| 45 | 63 | 78 | Growth |
| 50 | 55 | 70 | Growth |
| 64 | 72 | 112 | Scale |
| 72 | 79 | 128 | Scale |
| 78 | 70 | 118 | Scale |
| 61 | 88 | 52 | Opportunity |
View code and settings
Browser API
Graflume.bubble()
const data = [
{
"group": "Starter",
"name": "Atlas Lab",
"size": 28,
"x": 14,
"y": 38,
"z": 7
},
{
"group": "Starter",
"name": "Beacon Co",
"size": 34,
"x": 20,
"y": 45,
"z": 10
},
{
"group": "Starter",
"name": "Civic Data",
"size": 31,
"x": 25,
"y": 41,
"z": 12
},
{
"group": "Growth",
"name": "Delta Ops",
"size": 64,
"x": 38,
"y": 57,
"z": 15
},
{
"group": "Growth",
"name": "Ember Labs",
"size": 78,
"x": 45,
"y": 63,
"z": 18
},
{
"group": "Growth",
"name": "Foundry BI",
"size": 70,
"x": 50,
"y": 55,
"z": 21
},
{
"group": "Scale",
"name": "Harbor AI",
"size": 112,
"x": 64,
"y": 72,
"z": 25
},
{
"group": "Scale",
"name": "Lattice Co",
"size": 128,
"x": 72,
"y": 79,
"z": 28
},
{
"group": "Scale",
"name": "Meridian",
"size": 118,
"x": 78,
"y": 70,
"z": 31
},
{
"group": "Opportunity",
"name": "Northstar",
"size": 52,
"x": 61,
"y": 88,
"z": 34
}
];
const options = {
"height": 620,
"locale": "en",
"mark": {
"fields": {
"color": "group",
"size": "size"
}
},
"theme": "graflume-light",
"width": "container",
"x": {
"field": "x",
"title": "Engagement score",
"type": "quantitative"
},
"y": {
"field": "y",
"title": "Satisfaction score",
"type": "quantitative"
}
};
Graflume.bubble('#chart', data, options);Portable schema
ChartSpec 0.1 · options
{
"height": 620,
"locale": "en",
"mark": {
"fields": {
"color": "group",
"size": "size"
}
},
"theme": "graflume-light",
"width": "container",
"x": {
"field": "x",
"title": "Engagement score",
"type": "quantitative"
},
"y": {
"field": "y",
"title": "Satisfaction score",
"type": "quantitative"
}
}theme
Legend
Explain the visual meaning of layers, categories, or continuous values.
Loading
Legend · Row data
Row data and zero-copy TypedArray columns share one data contract.
xquantitative | yquantitative | sizequantitative | groupordinal |
|---|---|---|---|
| 14 | 38 | 28 | Starter |
| 20 | 45 | 34 | Starter |
| 25 | 41 | 31 | Starter |
| 38 | 57 | 64 | Growth |
| 45 | 63 | 78 | Growth |
| 50 | 55 | 70 | Growth |
| 64 | 72 | 112 | Scale |
| 72 | 79 | 128 | Scale |
| 78 | 70 | 118 | Scale |
| 61 | 88 | 52 | Opportunity |
View code and settings
Browser API
Graflume.bubble()
const data = [
{
"group": "Starter",
"name": "Atlas Lab",
"size": 28,
"x": 14,
"y": 38,
"z": 7
},
{
"group": "Starter",
"name": "Beacon Co",
"size": 34,
"x": 20,
"y": 45,
"z": 10
},
{
"group": "Starter",
"name": "Civic Data",
"size": 31,
"x": 25,
"y": 41,
"z": 12
},
{
"group": "Growth",
"name": "Delta Ops",
"size": 64,
"x": 38,
"y": 57,
"z": 15
},
{
"group": "Growth",
"name": "Ember Labs",
"size": 78,
"x": 45,
"y": 63,
"z": 18
},
{
"group": "Growth",
"name": "Foundry BI",
"size": 70,
"x": 50,
"y": 55,
"z": 21
},
{
"group": "Scale",
"name": "Harbor AI",
"size": 112,
"x": 64,
"y": 72,
"z": 25
},
{
"group": "Scale",
"name": "Lattice Co",
"size": 128,
"x": 72,
"y": 79,
"z": 28
},
{
"group": "Scale",
"name": "Meridian",
"size": 118,
"x": 78,
"y": 70,
"z": 31
},
{
"group": "Opportunity",
"name": "Northstar",
"size": 52,
"x": 61,
"y": 88,
"z": 34
}
];
const options = {
"height": 620,
"legend": {
"field": "group",
"interactive": true,
"labels": {
"hide": "Hide",
"show": "Show"
},
"maxItems": 8,
"mode": "categories",
"orientation": "horizontal",
"position": "bottom",
"title": "Group",
"visible": true
},
"locale": "en",
"mark": {
"fields": {
"color": "group",
"size": "size"
}
},
"width": "container",
"x": {
"field": "x",
"title": "Engagement score",
"type": "quantitative"
},
"y": {
"field": "y",
"title": "Satisfaction score",
"type": "quantitative"
}
};
Graflume.bubble('#chart', data, options);Portable schema
ChartSpec 0.1 · options
{
"height": 620,
"legend": {
"field": "group",
"interactive": true,
"labels": {
"hide": "Hide",
"show": "Show"
},
"maxItems": 8,
"mode": "categories",
"orientation": "horizontal",
"position": "bottom",
"title": "Group",
"visible": true
},
"locale": "en",
"mark": {
"fields": {
"color": "group",
"size": "size"
}
},
"width": "container",
"x": {
"field": "x",
"title": "Engagement score",
"type": "quantitative"
},
"y": {
"field": "y",
"title": "Satisfaction score",
"type": "quantitative"
}
}legend
- Legend:
legend · categories · group
Highlight
Emphasize a representative datum or spatial position to guide inspection.
Loading
Highlight · Row data
Row data and zero-copy TypedArray columns share one data contract.
xquantitative | yquantitative | sizequantitative | groupordinal |
|---|---|---|---|
| 14 | 38 | 28 | Starter |
| 20 | 45 | 34 | Starter |
| 25 | 41 | 31 | Starter |
| 38 | 57 | 64 | Growth |
| 45 | 63 | 78 | Growth |
| 50 | 55 | 70 | Growth |
| 64 | 72 | 112 | Scale |
| 72 | 79 | 128 | Scale |
| 78 | 70 | 118 | Scale |
| 61 | 88 | 52 | Opportunity |
View code and settings
Browser API
Graflume.bubble()
const data = [
{
"group": "Starter",
"name": "Atlas Lab",
"size": 28,
"x": 14,
"y": 38,
"z": 7
},
{
"group": "Starter",
"name": "Beacon Co",
"size": 34,
"x": 20,
"y": 45,
"z": 10
},
{
"group": "Starter",
"name": "Civic Data",
"size": 31,
"x": 25,
"y": 41,
"z": 12
},
{
"group": "Growth",
"name": "Delta Ops",
"size": 64,
"x": 38,
"y": 57,
"z": 15
},
{
"group": "Growth",
"name": "Ember Labs",
"size": 78,
"x": 45,
"y": 63,
"z": 18
},
{
"group": "Growth",
"name": "Foundry BI",
"size": 70,
"x": 50,
"y": 55,
"z": 21
},
{
"group": "Scale",
"name": "Harbor AI",
"size": 112,
"x": 64,
"y": 72,
"z": 25
},
{
"group": "Scale",
"name": "Lattice Co",
"size": 128,
"x": 72,
"y": 79,
"z": 28
},
{
"group": "Scale",
"name": "Meridian",
"size": 118,
"x": 78,
"y": 70,
"z": 31
},
{
"group": "Opportunity",
"name": "Northstar",
"size": 52,
"x": 61,
"y": 88,
"z": 34
}
];
const options = {
"height": 620,
"highlights": [
{
"id": "manual-focus",
"padding": 7,
"target": {
"field": "x",
"type": "datum",
"value": 50
}
}
],
"locale": "en",
"mark": {
"fields": {
"color": "group",
"size": "size"
}
},
"width": "container",
"x": {
"field": "x",
"title": "Engagement score",
"type": "quantitative"
},
"y": {
"field": "y",
"title": "Satisfaction score",
"type": "quantitative"
}
};
Graflume.bubble('#chart', data, options);Portable schema
ChartSpec 0.1 · options
{
"height": 620,
"highlights": [
{
"id": "manual-focus",
"padding": 7,
"target": {
"field": "x",
"type": "datum",
"value": 50
}
}
],
"locale": "en",
"mark": {
"fields": {
"color": "group",
"size": "size"
}
},
"width": "container",
"x": {
"field": "x",
"title": "Engagement score",
"type": "quantitative"
},
"y": {
"field": "y",
"title": "Satisfaction score",
"type": "quantitative"
}
}highlight
- Point and range highlights:
highlights[] · datum · x
Callout
Show an explanatory callout with automatic collision avoidance and multilingual wrapping.
Loading
Callout · Row data
Row data and zero-copy TypedArray columns share one data contract.
xquantitative | yquantitative | sizequantitative | groupordinal |
|---|---|---|---|
| 14 | 38 | 28 | Starter |
| 20 | 45 | 34 | Starter |
| 25 | 41 | 31 | Starter |
| 38 | 57 | 64 | Growth |
| 45 | 63 | 78 | Growth |
| 50 | 55 | 70 | Growth |
| 64 | 72 | 112 | Scale |
| 72 | 79 | 128 | Scale |
| 78 | 70 | 118 | Scale |
| 61 | 88 | 52 | Opportunity |
View code and settings
Browser API
Graflume.bubble()
const data = [
{
"group": "Starter",
"name": "Atlas Lab",
"size": 28,
"x": 14,
"y": 38,
"z": 7
},
{
"group": "Starter",
"name": "Beacon Co",
"size": 34,
"x": 20,
"y": 45,
"z": 10
},
{
"group": "Starter",
"name": "Civic Data",
"size": 31,
"x": 25,
"y": 41,
"z": 12
},
{
"group": "Growth",
"name": "Delta Ops",
"size": 64,
"x": 38,
"y": 57,
"z": 15
},
{
"group": "Growth",
"name": "Ember Labs",
"size": 78,
"x": 45,
"y": 63,
"z": 18
},
{
"group": "Growth",
"name": "Foundry BI",
"size": 70,
"x": 50,
"y": 55,
"z": 21
},
{
"group": "Scale",
"name": "Harbor AI",
"size": 112,
"x": 64,
"y": 72,
"z": 25
},
{
"group": "Scale",
"name": "Lattice Co",
"size": 128,
"x": 72,
"y": 79,
"z": 28
},
{
"group": "Scale",
"name": "Meridian",
"size": 118,
"x": 78,
"y": 70,
"z": 31
},
{
"group": "Opportunity",
"name": "Northstar",
"size": 52,
"x": 61,
"y": 88,
"z": 34
}
];
const options = {
"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": 50
},
"text": "Point and range highlights · 50"
}
],
"height": 620,
"interaction": {
"controls": {
"annotations": 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"
}
}
},
"locale": "en",
"mark": {
"fields": {
"color": "group",
"size": "size"
}
},
"width": "container",
"x": {
"field": "x",
"title": "Engagement score",
"type": "quantitative"
},
"y": {
"field": "y",
"title": "Satisfaction score",
"type": "quantitative"
}
};
Graflume.bubble('#chart', data, options);Portable schema
ChartSpec 0.1 · options
{
"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": 50
},
"text": "Point and range highlights · 50"
}
],
"height": 620,
"interaction": {
"controls": {
"annotations": 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"
}
}
},
"locale": "en",
"mark": {
"fields": {
"color": "group",
"size": "size"
}
},
"width": "container",
"x": {
"field": "x",
"title": "Engagement score",
"type": "quantitative"
},
"y": {
"field": "y",
"title": "Satisfaction score",
"type": "quantitative"
}
}callout
- Custom callouts:
annotations[] · datum · x · callout · placement:auto
Selection
Select and toggle data, then clear it from the background or Escape key.
Loading
Selection · Row data
Row data and zero-copy TypedArray columns share one data contract.
xquantitative | yquantitative | sizequantitative | groupordinal |
|---|---|---|---|
| 14 | 38 | 28 | Starter |
| 20 | 45 | 34 | Starter |
| 25 | 41 | 31 | Starter |
| 38 | 57 | 64 | Growth |
| 45 | 63 | 78 | Growth |
| 50 | 55 | 70 | Growth |
| 64 | 72 | 112 | Scale |
| 72 | 79 | 128 | Scale |
| 78 | 70 | 118 | Scale |
| 61 | 88 | 52 | Opportunity |
View code and settings
Browser API
Graflume.bubble()
const data = [
{
"group": "Starter",
"name": "Atlas Lab",
"size": 28,
"x": 14,
"y": 38,
"z": 7
},
{
"group": "Starter",
"name": "Beacon Co",
"size": 34,
"x": 20,
"y": 45,
"z": 10
},
{
"group": "Starter",
"name": "Civic Data",
"size": 31,
"x": 25,
"y": 41,
"z": 12
},
{
"group": "Growth",
"name": "Delta Ops",
"size": 64,
"x": 38,
"y": 57,
"z": 15
},
{
"group": "Growth",
"name": "Ember Labs",
"size": 78,
"x": 45,
"y": 63,
"z": 18
},
{
"group": "Growth",
"name": "Foundry BI",
"size": 70,
"x": 50,
"y": 55,
"z": 21
},
{
"group": "Scale",
"name": "Harbor AI",
"size": 112,
"x": 64,
"y": 72,
"z": 25
},
{
"group": "Scale",
"name": "Lattice Co",
"size": 128,
"x": 72,
"y": 79,
"z": 28
},
{
"group": "Scale",
"name": "Meridian",
"size": 118,
"x": 78,
"y": 70,
"z": 31
},
{
"group": "Opportunity",
"name": "Northstar",
"size": 52,
"x": 61,
"y": 88,
"z": 34
}
];
const options = {
"height": 620,
"interaction": {
"selection": {
"ariaLabel": "Interactive selection",
"clearOnBackground": true,
"clearOnEscape": true,
"highlight": {
"padding": 5
},
"key": "x",
"mode": "multiple",
"toggle": true
}
},
"locale": "en",
"mark": {
"fields": {
"color": "group",
"size": "size"
}
},
"width": "container",
"x": {
"field": "x",
"title": "Engagement score",
"type": "quantitative"
},
"y": {
"field": "y",
"title": "Satisfaction score",
"type": "quantitative"
}
};
Graflume.bubble('#chart', data, options);Portable schema
ChartSpec 0.1 · options
{
"height": 620,
"interaction": {
"selection": {
"ariaLabel": "Interactive selection",
"clearOnBackground": true,
"clearOnEscape": true,
"highlight": {
"padding": 5
},
"key": "x",
"mode": "multiple",
"toggle": true
}
},
"locale": "en",
"mark": {
"fields": {
"color": "group",
"size": "size"
}
},
"width": "container",
"x": {
"field": "x",
"title": "Engagement score",
"type": "quantitative"
},
"y": {
"field": "y",
"title": "Satisfaction score",
"type": "quantitative"
}
}selection
- Interactive selection:
selection · multiple · toggle
View controls
Show or hide zoom, pan, reset, projection, fullscreen, and PNG export one menu at a time. Set controls: false to remove the entire toolbar.
Loading
View controls · Row data
Row data and zero-copy TypedArray columns share one data contract.
xquantitative | yquantitative | sizequantitative | groupordinal |
|---|---|---|---|
| 14 | 38 | 28 | Starter |
| 20 | 45 | 34 | Starter |
| 25 | 41 | 31 | Starter |
| 38 | 57 | 64 | Growth |
| 45 | 63 | 78 | Growth |
| 50 | 55 | 70 | Growth |
| 64 | 72 | 112 | Scale |
| 72 | 79 | 128 | Scale |
| 78 | 70 | 118 | Scale |
| 61 | 88 | 52 | Opportunity |
View code and settings
Browser API
Graflume.bubble()
const data = [
{
"group": "Starter",
"name": "Atlas Lab",
"size": 28,
"x": 14,
"y": 38,
"z": 7
},
{
"group": "Starter",
"name": "Beacon Co",
"size": 34,
"x": 20,
"y": 45,
"z": 10
},
{
"group": "Starter",
"name": "Civic Data",
"size": 31,
"x": 25,
"y": 41,
"z": 12
},
{
"group": "Growth",
"name": "Delta Ops",
"size": 64,
"x": 38,
"y": 57,
"z": 15
},
{
"group": "Growth",
"name": "Ember Labs",
"size": 78,
"x": 45,
"y": 63,
"z": 18
},
{
"group": "Growth",
"name": "Foundry BI",
"size": 70,
"x": 50,
"y": 55,
"z": 21
},
{
"group": "Scale",
"name": "Harbor AI",
"size": 112,
"x": 64,
"y": 72,
"z": 25
},
{
"group": "Scale",
"name": "Lattice Co",
"size": 128,
"x": 72,
"y": 79,
"z": 28
},
{
"group": "Scale",
"name": "Meridian",
"size": 118,
"x": 78,
"y": 70,
"z": 31
},
{
"group": "Opportunity",
"name": "Northstar",
"size": 52,
"x": 61,
"y": 88,
"z": 34
}
];
const options = {
"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
},
"navigation": {
"drag": true,
"keyboard": true,
"maxZoom": 6,
"minZoom": 1,
"pinch": true,
"wheel": "modifier"
}
},
"locale": "en",
"mark": {
"fields": {
"color": "group",
"size": "size"
}
},
"padding": {
"top": 52
},
"width": "container",
"x": {
"field": "x",
"title": "Engagement score",
"type": "quantitative"
},
"y": {
"field": "y",
"title": "Satisfaction score",
"type": "quantitative"
}
};
Graflume.bubble('#chart', data, options);Portable schema
ChartSpec 0.1 · options
{
"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
},
"navigation": {
"drag": true,
"keyboard": true,
"maxZoom": 6,
"minZoom": 1,
"pinch": true,
"wheel": "modifier"
}
},
"locale": "en",
"mark": {
"fields": {
"color": "group",
"size": "size"
}
},
"padding": {
"top": 52
},
"width": "container",
"x": {
"field": "x",
"title": "Engagement score",
"type": "quantitative"
},
"y": {
"field": "y",
"title": "Satisfaction score",
"type": "quantitative"
}
}controls
Accessibility
Pair ARIA descriptions and keyboard guidance with a semantic data table.
Loading
Accessibility · Row data
Row data and zero-copy TypedArray columns share one data contract.
xquantitative | yquantitative | sizequantitative | groupordinal |
|---|---|---|---|
| 14 | 38 | 28 | Starter |
| 20 | 45 | 34 | Starter |
| 25 | 41 | 31 | Starter |
| 38 | 57 | 64 | Growth |
| 45 | 63 | 78 | Growth |
| 50 | 55 | 70 | Growth |
| 64 | 72 | 112 | Scale |
| 72 | 79 | 128 | Scale |
| 78 | 70 | 118 | Scale |
| 61 | 88 | 52 | Opportunity |
View code and settings
Browser API
Graflume.bubble()
const data = [
{
"group": "Starter",
"name": "Atlas Lab",
"size": 28,
"x": 14,
"y": 38,
"z": 7
},
{
"group": "Starter",
"name": "Beacon Co",
"size": 34,
"x": 20,
"y": 45,
"z": 10
},
{
"group": "Starter",
"name": "Civic Data",
"size": 31,
"x": 25,
"y": 41,
"z": 12
},
{
"group": "Growth",
"name": "Delta Ops",
"size": 64,
"x": 38,
"y": 57,
"z": 15
},
{
"group": "Growth",
"name": "Ember Labs",
"size": 78,
"x": 45,
"y": 63,
"z": 18
},
{
"group": "Growth",
"name": "Foundry BI",
"size": 70,
"x": 50,
"y": 55,
"z": 21
},
{
"group": "Scale",
"name": "Harbor AI",
"size": 112,
"x": 64,
"y": 72,
"z": 25
},
{
"group": "Scale",
"name": "Lattice Co",
"size": 128,
"x": 72,
"y": 79,
"z": 28
},
{
"group": "Scale",
"name": "Meridian",
"size": 118,
"x": 78,
"y": 70,
"z": 31
},
{
"group": "Opportunity",
"name": "Northstar",
"size": 52,
"x": 61,
"y": 88,
"z": 34
}
];
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": "Bubble · Accessibility example"
},
"height": 620,
"locale": "en",
"mark": {
"fields": {
"color": "group",
"size": "size"
}
},
"width": "container",
"x": {
"field": "x",
"title": "Engagement score",
"type": "quantitative"
},
"y": {
"field": "y",
"title": "Satisfaction score",
"type": "quantitative"
}
};
Graflume.bubble('#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": "Bubble · Accessibility example"
},
"height": 620,
"locale": "en",
"mark": {
"fields": {
"color": "group",
"size": "size"
}
},
"width": "container",
"x": {
"field": "x",
"title": "Engagement score",
"type": "quantitative"
},
"y": {
"field": "y",
"title": "Satisfaction score",
"type": "quantitative"
}
}accessibility