Scatter
Docs · Visuals
Scatter plot JSON format.
Points on two numeric axes, each with an optional label.
Try it
Edit the example and the visual redraws. Mistakes show the same messages the API returns.
The visual
Change any number or label. The chart follows.
Fields
| Field | Type | Rule |
|---|---|---|
xKeyRequired | string | The key in each row for the horizontal position. Up to 80 characters. |
yKeyRequired | string | The key in each row for the vertical position. Up to 80 characters. |
labelKeyOptional | string | The key in each row for the point's label. Up to 80 characters. Must differ from xKey and yKey. |
dataRequired | array | Up to 500 points. |
| Field | Type | Rule |
|---|---|---|
<xKey>Required | number | The horizontal position. |
<yKey>Required | number | The vertical position. |
<labelKey>Optional | string | Required when labelKey is set. Up to 80 characters; may be empty. |
Good to know
- Unlike the other charts, both axes are numbers here.
- A row may hold only xKey, yKey and labelKey.
Example
{
"xKey": "price",
"yKey": "orders",
"labelKey": "plan",
"data": [
{ "price": 5, "orders": 410, "plan": "Starter" },
{ "price": 9, "orders": 362, "plan": "Basic" },
{ "price": 12, "orders": 298, "plan": "Plus" },
{ "price": 19, "orders": 240, "plan": "Pro" },
{ "price": 24, "orders": 152, "plan": "Team" },
{ "price": 29, "orders": 131, "plan": "Studio" },
{ "price": 39, "orders": 74, "plan": "Agency" }
]
}Send it from your code
Paste the document in the editor, or replace it with a PUT to the visual's push URL. The push API page has the details and examples.
Next: Funnel chart JSON format