Quantize / threshold / quantile scales
native
Binned colour scales
Matrix status native. Verification render · strong. ChartKit option: ChartKitChartSpecV1.encoding.color.scale.type=quantize, ChartKitChartSpecV1.encoding.color.scale.thresholds.
encoding.color.scale.type quantize or threshold. bins sets the quantize width. thresholds sets the cuts. On x or y the same words are an error and the hint points at the colour scale (CK3063).
Source: chartkit:packages/core/src/color-scale.ts
ChartKit spec
Passed validate() during npm run matrix:refresh. The SVG is the server render.
{
"version": "1",
"type": "heatmap",
"data": [
{
"bay": "Ash",
"bell": "02",
"kiln": -12
},
{
"bay": "Elm",
"bell": "14",
"kiln": 80
},
{
"bay": "Oak",
"bell": "14",
"kiln": 420
}
],
"encoding": {
"x": "bell",
"y": "bay",
"color": {
"field": "kiln",
"scale": {
"type": "quantize",
"bins": 4
}
}
},
"a11y": {
"alt": "Oak is the hottest bay."
},
"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: scale.quantize.md.
| Library | Status | Option | Verification | Source |
|---|---|---|---|---|
| Chart.js | none | — | absence · absence | — |
| Recharts | unknown | — | conflict · unknown | — |
| Apache ECharts | native | visualMappiecewise splitNumber/pieces | types · strong | echarts/types/dist/shared.d.ts:12590 |
| Highcharts | native | colorAxis.dataClasses | types · strong | highcharts/highcharts.d.ts:8389 |
| Plotly.js | none | — | absence · absence | — |
| Nivo | native | grep: quantize | grep · weak | @nivo/heatmap/dist/types/hooks.d.ts:30 |
| Victory | none | — | absence · absence | — |
| visx | native | grep: scaleQuantize | grep · weak | @visx/scale/lib/index.d.ts:10 |
| ApexCharts | native | plotOptions.heatmap.colorScale.ranges | types · strong | apexcharts/types/apexcharts.d.ts:3434 |
| Tremor (npm) | none | — | absence · absence | — |
| Observable Plot | native | grep: quantize | grep · weak | @observablehq/plot/src/scales.d.ts:195 |
| Vega-Lite | native | grep: quantize | grep · weak | 20073: "description" |
| AG Charts | none | — | absence · absence | — |
| amCharts 5 | partial | grep: heatRules | grep · weak | @amcharts/amcharts5/examples/xy-bubble/config.json:549 |
| Google Charts | none | — | absence · absence | — |
| uPlot | none | — | absence · absence | — |
| TradingView Lightweight Charts | none | — | absence · absence | — |
| MUI X Charts | native | grep: piecewisepiecewise color map thresholds | grep · weak | @mui/x-charts/ChartsLegend/piecewiseColorLegendClasses.d.ts:1 |
| Mermaid (chart-ish diagrams only) | none | — | absence · absence | — |
| AntV G2 | native | grep: quantize | grep · weak | @antv/g2/lib/index.d.ts:100 |