Legend item styling
native
Marker shape, size, font, spacing
Matrix status native. Verification types · strong. ChartKit option: ChartKitChartSpecV1.legend.symbol.
symbol and per-series symbols.
Source: chartkit:packages/core/src/generated/schema.ts:215
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": {
"symbol": "circle"
}
}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.style.md.
| Library | Status | Option | Verification | Source |
|---|---|---|---|---|
| Chart.js | native | grep: boxWidth | grep · weak | chart.js/dist/types/index.d.ts:2354 |
| Recharts | native | Legend.iconType, Legend.iconSize | types · strong | recharts/types/component/DefaultLegendContent.d.ts:35 |
| Apache ECharts | native | legend.itemWidth, legend.icon | types · strong | echarts/types/dist/shared.d.ts:4365 |
| Highcharts | native | legend.itemStyle, legend.symbolRadius | types · strong | highcharts/highcharts.d.ts:13500 |
| Plotly.js | native | layout.legend.font, layout.legend.itemsizing | types · strong | plot-schema.json#layout.layoutAttributes.legend.font |
| Nivo | native | grep: symbolShape | grep · weak | @nivo/legends/dist/types/types.d.ts:15 |
| Victory | native | VictoryLegend.symbolSpacer, VictoryLegend.style | types · strong | victory-legend/lib/victory-legend.d.ts:23 |
| visx | native | LegendOrdinal.shape, LegendOrdinal.shapeWidth | types · strong | @visx/legend/lib/legends/Legend/index.d.ts:39 |
| ApexCharts | native | legend.markers.size, legend.fontSize | types · strong | apexcharts/types/apexcharts.d.ts:4617 |
| Tremor (npm) | none | — | absence · absence | — |
| Observable Plot | native | grep: swatchSize | grep · weak | @observablehq/plot/src/legends.d.ts:117 |
| Vega-Lite | native | grep: symbolType | grep · weak | 1381: "labelFontSize" |
| AG Charts | native | grep: marker | grep · weak | ag-charts-types/dist/types/src/main.d.ts:86 |
| amCharts 5 | native | grep: markerRectangles | grep · weak | @amcharts/amcharts5/.internal/core/render/Legend.d.ts:118 |
| Google Charts | native | grep: textStyle | grep · weak | @types/google.visualization/index.d.ts:404 |
| uPlot | partial | Options.legend.markers | types · strong | uplot/dist/uPlot.d.ts:283 |
| TradingView Lightweight Charts | none | — | absence · absence | — |
| MUI X Charts | unknown | grep: markGap | unverified · unknown | — |
| Mermaid (chart-ish diagrams only) | none | — | absence · absence | — |
| AntV G2 | native | grep: itemMarker | grep · weak | @antv/g2/lib/theme/create.d.ts:305 |