Categorical colour scale / palette
native
Map categories to a palette
Matrix status native. Verification types · strong. ChartKit option: ChartKitChartSpecV1.theme.tokens.series.
Source: chartkit:packages/core/src/generated/schema.ts:395
ChartKit spec
Passed validate() during npm run matrix:refresh. The SVG is the server render.
{
"version": "1",
"type": "line",
"data": [
{
"quarter": "Q1",
"units": 40
},
{
"quarter": "Q2",
"units": 55
}
],
"encoding": {
"x": "quarter",
"y": "units"
},
"a11y": {
"alt": "Units rose in Q2."
},
"size": {
"width": 640,
"height": 260
},
"theme": {
"tokens": {
"series": [
"#0066cc",
"#c45c26"
]
}
}
}Other libraries
Option names are the paths recorded in the matrix. A grep-only cell names the identifier that matched, not a render test. Markdown copy: scale.color.ordinal.md.
| Library | Status | Option | Verification | Source |
|---|---|---|---|---|
| Chart.js | manual | Plugin.afterDatasetsDrawdataset colours; Colors plugin cycles defaults | mechanism · weak | chart.js/dist/types/index.d.ts:1051 |
| Recharts | partial | Cellper-series colours manual | types · strong | recharts/types/component/Cell.d.ts:25 |
| Apache ECharts | native | colortop-level palette | types · strong | echarts/types/dist/shared.d.ts:7594 |
| Highcharts | native | colors | types · strong | highcharts/highcharts.d.ts:93499 |
| Plotly.js | native | layout.colorway | types · strong | plot-schema.json#layout.layoutAttributes.colorway |
| Nivo | native | Line.colorsscheme name or array | types · strong | @nivo/line/dist/types/types.d.ts:137 |
| Victory | native | VictoryChart.theme | types · strong | victory-core/lib/victory-util/common-props.d.ts:58 |
| visx | native | grep: scaleOrdinal | grep · weak | @visx/shape/lib/shapes/BarGroup.d.ts:48 |
| ApexCharts | native | colors | types · strong | apexcharts/types/apexcharts.d.ts:1457 |
| Tremor (npm) | native | LineChart.colors | types · strong | @tremor/react/dist/index.d.ts:59 |
| Observable Plot | native | grep: scheme | grep · weak | @observablehq/plot/src/scales.d.ts:2 |
| Vega-Lite | native | grep: scheme | grep · weak | 4935: "ColorScheme" |
| AG Charts | native | grep: palette | grep · weak | ag-charts-types/dist/types/src/integratedCharts.d.ts:2 |
| amCharts 5 | native | ColorSet | types · strong | @amcharts/amcharts5/.internal/core/util/ColorSet.d.ts:75 |
| Google Charts | native | LineChartOptions.colors | types · strong | @types/google.visualization/index.d.ts:786 |
| uPlot | none | — | absence · absence | — |
| TradingView Lightweight Charts | none | — | absence · absence | — |
| MUI X Charts | native | grep: ordinalcolorMap type 'ordinal' | grep · weak | @mui/x-charts/hooks/useTicks.d.ts:2 |
| Mermaid (chart-ish diagrams only) | native | grep: plotColorPalette | grep · weak | mermaid/dist/diagrams/xychart/chartBuilder/interfaces.d.ts:20 |
| AntV G2 | native | grep: palette | grep · weak | @antv/g2/lib/index.d.ts:89 |