Custom colour palette
native
Replace the series colour cycle
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: theme.palette.md.
| Library | Status | Option | Verification | Source |
|---|---|---|---|---|
| Chart.js | manual | Plugin.afterDatasetsDrawper dataset or Colors plugin | mechanism · weak | chart.js/dist/types/index.d.ts:1051 |
| Recharts | manual | Customized | mechanism · weak | recharts/types/component/Customized.d.ts:26 |
| Apache ECharts | native | color | 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.colors | types · strong | @nivo/line/dist/types/types.d.ts:137 |
| Victory | native | VictoryChart.colorScale | types · strong | victory-core/lib/victory-util/common-props.d.ts:21 |
| 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: range | grep · weak | 164: "description" |
| 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 | manual | Options.hooks | mechanism · weak | uplot/dist/uPlot.d.ts:394 |
| TradingView Lightweight Charts | manual | grep: ICustomSeriesPaneView | mechanism · weak | 1629: addCustomSeries<TData extends CustomData<HorzScaleItem>, TOptions extends CustomSeriesOptions, TPartialOptions extends SeriesPartialOptions<TOptions> = SeriesPartialOptions<TOptions>>(customPaneView |
| MUI X Charts | native | grep: colorspalettes exported | grep · weak | @mui/x-charts/SparkLineChart/SparkLineChart.d.ts:16 |
| Mermaid (chart-ish diagrams only) | native | grep: plotColorPalette | grep · weak | mermaid/dist/themes/theme-redux.d.ts:114 |
| AntV G2 | native | grep: palette | grep · weak | @antv/g2/lib/index.d.ts:89 |