Features · legend

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.

B is darker.B is darker.LABA, L: 1B, L: 4v14
{
  "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.

LibraryStatusOptionVerificationSource
Chart.jsnone—absence · absence—
Rechartsnone—absence · absence—
Apache EChartsnativevisualMap.typecontinuous visualMaptypes · strongecharts/types/dist/shared.d.ts:8225
HighchartsnativecolorAxistypes · stronghighcharts/highcharts.d.ts:93483
Plotly.jsnativetrace.colorbartypes · strongplot-schema.json#traces.{choropleth,choroplethmap,cone,contour,contourcarpet,densitymap,…}.attributes.colorbar
Nivonativegrep: ContinuousColorsLegendgrep · weak@nivo/legends/dist/types/types.d.ts:92
Victorynone—absence · absence—
visxnativeLegendLinear, LegendThresholdtypes · strong@visx/legend/lib/legends/Linear.d.ts:9
ApexChartsnone—absence · absence—
Tremor (npm)none—absence · absence—
Observable Plotnativegrep: ramplegend type rampgrep · weak@observablehq/plot/src/scales.d.ts:539
Vega-Litenativegrep: gradientlegend type gradientgrep · weak251: "$ref"
AG Chartsnativegrep: gradientLegendgrep · weakag-charts-types/dist/types/src/main.d.ts:26
amCharts 5nativeHeatLegendtypes · strong@amcharts/amcharts5/.internal/core/render/HeatLegend.d.ts:77
Google Chartsnativegrep: colorAxisgrep · weak@types/google.visualization/index.d.ts:373
uPlotnone—absence · absence—
TradingView Lightweight Chartsnone—absence · absence—
MUI X Chartsnativegrep: ContinuousColorLegendgrep · weak@mui/x-charts/ChartsLegend/piecewiseColorLegendClasses.d.ts:1
Mermaid (chart-ish diagrams only)none—absence · absence—
AntV G2nativegrep: legendContinuousgrep · weak@antv/g2/lib/index.d.ts:113