Per-point / per-category colour
native
Colour individual bars, slices or points
Matrix status native. Verification runtime · strong. ChartKit option: ChartKitChartSpecV1.encoding.color.
encoding.color names a category or a paint column. domain and range map values to colours. Drawn on bar, scatter, and pie. Probed by rendering.
Source: packages/core/src/generated/schema.ts:482
ChartKit spec
Passed validate() during npm run matrix:refresh. The SVG is the server render.
{
"version": "1",
"type": "bar",
"data": [
{
"lane": "A",
"stops": 12,
"group": "A"
},
{
"lane": "C",
"stops": 15,
"group": "B"
}
],
"encoding": {
"x": "lane",
"y": "stops",
"color": "group"
},
"a11y": {
"alt": "Lane C has more."
},
"size": {
"width": 640,
"height": 260
}
}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: mark.color.point.md.
| Library | Status | Option | Verification | Source |
|---|---|---|---|---|
| Chart.js | native | ChartConfiguration.data.datasets.backgroundColorarray or scriptable | types · strong | chart.js/dist/types/index.d.ts:1828 |
| Recharts | native | Cell<Cell fill> per datum | types · strong | recharts/types/component/Cell.d.ts:25 |
| Apache ECharts | native | series.datadata item itemStyle / colorBy:'data' | types · strong | echarts/types/dist/shared.d.ts:11188 |
| Highcharts | native | plotOptions.column.colorByPoint | types · strong | highcharts/options/column.d.ts:680 |
| Plotly.js | native | trace.marker.colorarray | types · strong | plot-schema.json#traces.{bar,barpolar,box,funnel,histogram,histogram2d,…}.attributes.marker.color |
| Nivo | native | Bar.colorBy | types · strong | @nivo/bar/dist/types/types.d.ts:169 |
| Victory | partial | VictoryBar.stylefunctional style per datum | types · strong | victory-bar/lib/victory-bar.d.ts:15 |
| visx | native | Bar.fill | types · strong | @types/react/index.d.ts:3798 |
| ApexCharts | native | plotOptions.bar.distributed | types · strong | apexcharts/types/apexcharts.d.ts:3102 |
| Tremor (npm) | partial | BarListsingle colour per category series | types · strong | @tremor/react/dist/index.d.ts:640 |
| Observable Plot | native | grep: fillfill channel per datum | grep · weak | @observablehq/plot/src/symbol.d.ts:5 |
| Vega-Lite | native | grep: color | grep · weak | 238: "description" |
| AG Charts | native | grep: itemStyleritemStyler callback | grep · weak | ag-charts-types/dist/types/src/presets/quadrant/quadrantOptions.d.ts:8 |
| amCharts 5 | native | grep: adapterstemplate adapters / heatRules | grep · weak | @amcharts/amcharts5/.internal/plugins/json/Serializer.d.ts:58 |
| Google Charts | native | grep: stylestyle role column | grep · weak | @types/google.visualization/index.d.ts:403 |
| uPlot | partial | grep: fillfill can be a function (gradient), not per point | grep · weak | 303: export type Fill = CSSStyleDeclaration['background'] | ((self |
| TradingView Lightweight Charts | native | grep: colorper-bar color field in data | grep · weak | 24: * Represents a type of color. |
| MUI X Charts | native | grep: colorMap | grep · weak | @mui/x-charts/ChartsYAxis/useAxisTicksProps.d.ts:36 |
| Mermaid (chart-ish diagrams only) | none | — | absence · absence | — |
| AntV G2 | native | grep: color | grep · weak | @antv/g2/lib/index.d.ts:43 |