Chart Mapping
Series mapping by column name (after any 'fields' selection). Mapping only selects and orders columns; pie, doughnut and other single-series constructs still plot one series. An unknown name is a 'chart-mapping-unknown-column' error; a series that repeats the category or X column, and an X column on a chart type without an X axis, are dropped with a 'chart-mapping-adapted' warning.
Metadata
Field index
| Field | Type | Req. | Description |
|---|---|---|---|
| category | string | — | The label (category) column. Default: the first column. |
| x | string | — | The X column of an XY (scatter) chart. Default: the second column (the first, when the category is the second column), and only when there are three or more columns: with two, the second column is the one series, plotted against row numbers. An X that leaves no series is plotted as the series with a 'chart-mapping-adapted' warning. |
| series | array<string> | — | The plotted columns, in order. Default: every column that is not the category or the X column. |
category
typestringrequirednodefault—
The label (category) column. Default: the first column.
{
"category": "Quarter"
}x
typestringrequirednodefault—
The X column of an XY (scatter) chart. Default: the second column (the first, when the category is the second column), and only when there are three or more columns: with two, the second column is the one series, plotted against row numbers. An X that leaves no series is plotted as the series with a 'chart-mapping-adapted' warning.
{
"x": "Spend"
}series
typearray<string>requirednodefault—
The plotted columns, in order. Default: every column that is not the category or the X column.
{
"series": [
"Revenue",
"Costs"
]
}Complete definition constraints
{
"type": "object",
"additionalProperties": false,
"description": "Series mapping by column name (after any 'fields' selection). Mapping only selects and orders columns; pie, doughnut and other single-series constructs still plot one series. An unknown name is a 'chart-mapping-unknown-column' error; a series that repeats the category or X column, and an X column on a chart type without an X axis, are dropped with a 'chart-mapping-adapted' warning.",
"properties": {
"category": {
"type": "string",
"description": "The label (category) column. Default: the first column.",
"examples": [
"Quarter"
]
},
"x": {
"type": "string",
"description": "The X column of an XY (scatter) chart. Default: the second column (the first, when the category is the second column), and only when there are three or more columns: with two, the second column is the one series, plotted against row numbers. An X that leaves no series is plotted as the series with a 'chart-mapping-adapted' warning.",
"examples": [
"Spend"
]
},
"series": {
"type": "array",
"items": {
"type": "string"
},
"minItems": 1,
"description": "The plotted columns, in order. Default: every column that is not the category or the X column.",
"examples": [
[
"Revenue",
"Costs"
]
]
}
},
"examples": [
{
"category": "Quarter",
"series": [
"Costs",
"Revenue"
]
},
{
"category": "Region",
"x": "Spend",
"series": [
"Revenue"
]
}
]
}