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.
{
"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.
| Library | Status | Option | Verification | Source |
|---|---|---|---|---|
| Chart.js | native | grep: legendplugins.legend.display | grep · weak | chart.js/dist/types/index.d.ts:77 |
| Recharts | native | Legend | types · strong | recharts/types/component/Legend.d.ts:114 |
| Apache ECharts | native | legend.show | types · strong | echarts/types/dist/shared.d.ts:4342 |
| Highcharts | native | legend.enabled | types · strong | highcharts/highcharts.d.ts:13447 |
| Plotly.js | native | layout.showlegend | types · strong | plot-schema.json#layout.layoutAttributes.showlegend |
| Nivo | native | Line.legends | types · strong | @nivo/line/dist/types/types.d.ts:152 |
| Victory | native | VictoryLegend | types · strong | victory-legend/lib/victory-legend.d.ts:55 |
| visx | native | LegendOrdinal | types · strong | @visx/legend/lib/legends/Ordinal.d.ts:6 |
| ApexCharts | native | legend.show | types · strong | apexcharts/types/apexcharts.d.ts:4592 |
| Tremor (npm) | native | LineChart.showLegend | types · strong | @tremor/react/dist/index.d.ts:67 |
| Observable Plot | native | grep: legendcolor: {legend: true} | grep · weak | @observablehq/plot/src/scales.d.ts:3 |
| Vega-Lite | native | grep: legend | grep · weak | 1165: "description" |
| AG Charts | native | AgChartOptions.legend | types · strong | ag-charts-types/dist/types/src/chart/chartOptions.d.ts:262 |
| amCharts 5 | native | Legend | types · strong | @amcharts/amcharts5/.internal/core/render/Legend.d.ts:107 |
| Google Charts | native | grep: legendlegend: 'none' | {position} | grep · weak | @types/google.visualization/index.d.ts:380 |
| uPlot | native | Options.legend.show | types · strong | uplot/dist/uPlot.d.ts:277 |
| TradingView Lightweight Charts | none | —no legend | absence · absence | — |
| MUI X Charts | native | LineChart.hideLegend | types · strong | @mui/x-charts/LineChart/LineChart.d.mts:40 |
| Mermaid (chart-ish diagrams only) | unknown | — | conflict · unknown | — |
| AntV G2 | native | grep: legend | grep · weak | @antv/g2/lib/index.d.ts:112 |