Features · legend

Show / hide legend

native

Toggle the legend

Matrix status native. Verification types · strong. ChartKit option: ChartKitChartSpecV1.legend.show.

Source: chartkit:packages/core/src/generated/schema.ts:169

ChartKit spec

Passed validate() during npm run matrix:refresh. The SVG is the server render.

Units rose in Q2.Units rose in Q2.40455055Q1Q2
{
  "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
  },
  "legend": {
    "show": true
  }
}

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.show.md.

LibraryStatusOptionVerificationSource
Chart.jsnativegrep: legendplugins.legend.displaygrep · weakchart.js/dist/types/index.d.ts:77
RechartsnativeLegendtypes · strongrecharts/types/component/Legend.d.ts:114
Apache EChartsnativelegend.showtypes · strongecharts/types/dist/shared.d.ts:4342
Highchartsnativelegend.enabledtypes · stronghighcharts/highcharts.d.ts:13447
Plotly.jsnativelayout.showlegendtypes · strongplot-schema.json#layout.layoutAttributes.showlegend
NivonativeLine.legendstypes · strong@nivo/line/dist/types/types.d.ts:152
VictorynativeVictoryLegendtypes · strongvictory-legend/lib/victory-legend.d.ts:55
visxnativeLegendOrdinaltypes · strong@visx/legend/lib/legends/Ordinal.d.ts:6
ApexChartsnativelegend.showtypes · strongapexcharts/types/apexcharts.d.ts:4592
Tremor (npm)nativeLineChart.showLegendtypes · strong@tremor/react/dist/index.d.ts:67
Observable Plotnativegrep: legendcolor: {legend: true}grep · weak@observablehq/plot/src/scales.d.ts:3
Vega-Litenativegrep: legendgrep · weak1165: "description"
AG ChartsnativeAgChartOptions.legendtypes · strongag-charts-types/dist/types/src/chart/chartOptions.d.ts:262
amCharts 5nativeLegendtypes · strong@amcharts/amcharts5/.internal/core/render/Legend.d.ts:107
Google Chartsnativegrep: legendlegend: 'none' | {position}grep · weak@types/google.visualization/index.d.ts:380
uPlotnativeOptions.legend.showtypes · stronguplot/dist/uPlot.d.ts:277
TradingView Lightweight Chartsnone—no legendabsence · absence—
MUI X ChartsnativeLineChart.hideLegendtypes · strong@mui/x-charts/LineChart/LineChart.d.mts:40
Mermaid (chart-ish diagrams only)unknown—conflict · unknown—
AntV G2nativegrep: legendgrep · weak@antv/g2/lib/index.d.ts:112