Continuous colour legend / colour bar
native
Gradient legend for colour scales
Matrix status native. Verification types · strong. ChartKit option: ChartKitChartSpecV1.encoding.color.scale.type=sequential.
Gradient or binned colour legend.
Source: chartkit:packages/core/src/generated/schema.ts:779
ChartKit spec
Passed validate() during npm run matrix:refresh. The SVG is the server render.
{
"version": "1",
"type": "heatmap",
"data": [
{
"x": "A",
"y": "L",
"v": 1
},
{
"x": "B",
"y": "L",
"v": 4
}
],
"encoding": {
"x": "x",
"y": "y",
"color": {
"field": "v",
"scale": {
"type": "sequential"
}
}
},
"a11y": {
"alt": "B is darker."
},
"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: legend.continuous.md.
| Library | Status | Option | Verification | Source |
|---|---|---|---|---|
| Chart.js | none | — | absence · absence | — |
| Recharts | none | — | absence · absence | — |
| Apache ECharts | native | visualMap.typecontinuous visualMap | types · strong | echarts/types/dist/shared.d.ts:8225 |
| Highcharts | native | colorAxis | types · strong | highcharts/highcharts.d.ts:93483 |
| Plotly.js | native | trace.colorbar | types · strong | plot-schema.json#traces.{choropleth,choroplethmap,cone,contour,contourcarpet,densitymap,…}.attributes.colorbar |
| Nivo | native | grep: ContinuousColorsLegend | grep · weak | @nivo/legends/dist/types/types.d.ts:92 |
| Victory | none | — | absence · absence | — |
| visx | native | LegendLinear, LegendThreshold | types · strong | @visx/legend/lib/legends/Linear.d.ts:9 |
| ApexCharts | none | — | absence · absence | — |
| Tremor (npm) | none | — | absence · absence | — |
| Observable Plot | native | grep: ramplegend type ramp | grep · weak | @observablehq/plot/src/scales.d.ts:539 |
| Vega-Lite | native | grep: gradientlegend type gradient | grep · weak | 251: "$ref" |
| AG Charts | native | grep: gradientLegend | grep · weak | ag-charts-types/dist/types/src/main.d.ts:26 |
| amCharts 5 | native | HeatLegend | types · strong | @amcharts/amcharts5/.internal/core/render/HeatLegend.d.ts:77 |
| Google Charts | native | grep: colorAxis | grep · weak | @types/google.visualization/index.d.ts:373 |
| uPlot | none | — | absence · absence | — |
| TradingView Lightweight Charts | none | — | absence · absence | — |
| MUI X Charts | native | grep: ContinuousColorLegend | grep · weak | @mui/x-charts/ChartsLegend/piecewiseColorLegendClasses.d.ts:1 |
| Mermaid (chart-ish diagrams only) | none | — | absence · absence | — |
| AntV G2 | native | grep: legendContinuous | grep · weak | @antv/g2/lib/index.d.ts:113 |