Features · label

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.

Lane C has more.Lane C has more.1215051015AC
{
  "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.

LibraryStatusOptionVerificationSource
Chart.jsplugin—npm · weak—
RechartsnativeLabelList, Bar.labeltypes · strongrecharts/types/component/LabelList.d.ts:146
Apache EChartsnativeseries.label.showtypes · strongecharts/types/dist/shared.d.ts:7875
HighchartsnativeplotOptions.series.dataLabels.enabledtypes · stronghighcharts/options/series.d.ts:232
Plotly.jsnativetrace.text, trace.textpositiontypes · strongplot-schema.json#traces.{bar,barpolar,box,candlestick,choropleth,choroplethmap,…}.attributes.text
NivonativeBar.enableLabeltypes · strong@nivo/bar/dist/types/types.d.ts:154
VictorynativeVictoryBar.labelstypes · strongvictory-core/lib/types/prop-types.d.ts:117
visxmanualGroupText per datummechanism · weak@visx/group/lib/Group.d.ts:15
ApexChartsnativedataLabels.enabledtypes · strongapexcharts/types/apexcharts.d.ts:4708
Tremor (npm)none—no data labels (BarList shows values)absence · absence—
Observable Plotnativetexttypes · strong@observablehq/plot/src/marks/text.d.ts:211
Vega-Litenativemark=texttypes · strongvega-lite/build/spec/unit.d.ts:19
AG Chartsnativeseries.labeltypes · strongag-charts-types/dist/types/src/series/cartesian/areaOptions.d.ts:38
amCharts 5nativegrep: LabelBulletgrep · weak@amcharts/amcharts5/xy.d.ts:13
Google Chartsnativegrep: annotationsannotation role or pieSliceTextgrep · weak@types/google.visualization/index.d.ts:402
uPlotnone—absence · absence—
TradingView Lightweight Chartspartialgrep: lastValueVisiblelast value label on price scalegrep · weak4032: lastValueVisible
MUI X ChartsnativeBarChart.series.barLabeltypes · strong@mui/x-charts/models/seriesType/bar.d.mts:53
Mermaid (chart-ish diagrams only)nativeMermaidConfig.pie.textPositionpie labelstypes · strongmermaid/dist/config.type.d.ts:938
AntV G2nativegrep: labelgrep · weak@antv/g2/lib/index.d.ts:165