Values in legend
native
Show the current/last value next to each series name
Matrix status native. Verification runtime · strong. ChartKit option: ChartKitChartSpecV1.legend.values.
last value (line) or slice value (donut); line values are drawn on createRenderer([line]) since PR #17 (main 116d0af)
Source: chartkit:packages/core/src/generated/schema.ts:181
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": {
"values": 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.values.md.
| Library | Status | Option | Verification | Source |
|---|---|---|---|---|
| Chart.js | unknown | — | conflict · unknown | — |
| Recharts | partial | Legend.formatter | types · strong | recharts/types/component/DefaultLegendContent.d.ts:83 |
| Apache ECharts | native | legend.formatter | types · strong | echarts/types/dist/shared.d.ts:4306 |
| Highcharts | native | legend.labelFormatter | types · strong | highcharts/highcharts.d.ts:13522 |
| Plotly.js | none | — | absence · absence | — |
| Nivo | none | — | absence · absence | — |
| Victory | none | — | absence · absence | — |
| visx | manual | Group | mechanism · weak | @visx/group/lib/Group.d.ts:15 |
| ApexCharts | native | legend.formatter | types · strong | apexcharts/types/apexcharts.d.ts:4607 |
| Tremor (npm) | none | — | absence · absence | — |
| Observable Plot | none | — | absence · absence | — |
| Vega-Lite | none | — | absence · absence | — |
| AG Charts | unknown | — | unverified · unknown | — |
| amCharts 5 | native | grep: valueText | grep · weak | @amcharts/amcharts5/.internal/charts/xy/series/XYSeries.d.ts:497 |
| Google Charts | none | — | absence · absence | — |
| uPlot | native | Options.legend.livelive values on hover | types · strong | uplot/dist/uPlot.d.ts:279 |
| TradingView Lightweight Charts | none | — | absence · absence | — |
| MUI X Charts | none | — | absence · absence | — |
| Mermaid (chart-ish diagrams only) | none | — | absence · absence | — |
| AntV G2 | native | grep: itemValue | grep · weak | @antv/g2/lib/spec/interaction.d.ts:5 |