Data labels on marks
native
Print values on bars, points, slices
Matrix status native. Verification runtime · strong. ChartKit option: ChartKitChartSpecV1.mark.labels.
Line, stacked area, scatter, bar, and donut draw mark.labels. CK3012 is gone. Overlapping labels are skipped.
Source: packages/core/src/generated/schema.ts:887
ChartKit spec
Passed validate() during npm run matrix:refresh. The SVG is the server render.
{
"version": "1",
"type": "bar",
"data": [
{
"lane": "A",
"stops": 12
},
{
"lane": "C",
"stops": 15
}
],
"encoding": {
"x": "lane",
"y": "stops"
},
"a11y": {
"alt": "Lane C has more."
},
"size": {
"width": 640,
"height": 260
},
"mark": {
"labels": 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: label.show.md.
| Library | Status | Option | Verification | Source |
|---|---|---|---|---|
| Chart.js | plugin | — | npm · weak | — |
| Recharts | native | LabelList, Bar.label | types · strong | recharts/types/component/LabelList.d.ts:146 |
| Apache ECharts | native | series.label.show | types · strong | echarts/types/dist/shared.d.ts:7875 |
| Highcharts | native | plotOptions.series.dataLabels.enabled | types · strong | highcharts/options/series.d.ts:232 |
| Plotly.js | native | trace.text, trace.textposition | types · strong | plot-schema.json#traces.{bar,barpolar,box,candlestick,choropleth,choroplethmap,…}.attributes.text |
| Nivo | native | Bar.enableLabel | types · strong | @nivo/bar/dist/types/types.d.ts:154 |
| Victory | native | VictoryBar.labels | types · strong | victory-core/lib/types/prop-types.d.ts:117 |
| visx | manual | GroupText per datum | mechanism · weak | @visx/group/lib/Group.d.ts:15 |
| ApexCharts | native | dataLabels.enabled | types · strong | apexcharts/types/apexcharts.d.ts:4708 |
| Tremor (npm) | none | —no data labels (BarList shows values) | absence · absence | — |
| Observable Plot | native | text | types · strong | @observablehq/plot/src/marks/text.d.ts:211 |
| Vega-Lite | native | mark=text | types · strong | vega-lite/build/spec/unit.d.ts:19 |
| AG Charts | native | series.label | types · strong | ag-charts-types/dist/types/src/series/cartesian/areaOptions.d.ts:38 |
| amCharts 5 | native | grep: LabelBullet | grep · weak | @amcharts/amcharts5/xy.d.ts:13 |
| Google Charts | native | grep: annotationsannotation role or pieSliceText | grep · weak | @types/google.visualization/index.d.ts:402 |
| uPlot | none | — | absence · absence | — |
| TradingView Lightweight Charts | partial | grep: lastValueVisiblelast value label on price scale | grep · weak | 4032: lastValueVisible |
| MUI X Charts | native | BarChart.series.barLabel | types · strong | @mui/x-charts/models/seriesType/bar.d.mts:53 |
| Mermaid (chart-ish diagrams only) | native | MermaidConfig.pie.textPositionpie labels | types · strong | mermaid/dist/config.type.d.ts:938 |
| AntV G2 | native | grep: label | grep · weak | @antv/g2/lib/index.d.ts:165 |