Features · label

Data label position

native

Inside/outside/top/center placement

Matrix status native. Verification runtime · strong. ChartKit option: ChartKitChartSpecV1.mark.labelPosition.

top, bottom, left, right, center, inside, or outside. inside and outside suit bar and donut. Setting it turns labels on.

Source: packages/core/src/generated/schema.ts:891

ChartKit spec

Passed validate() during npm run matrix:refresh. The SVG is the server render.

Units rose in Q2.Units rose in Q2.405540455055Q1Q2
{
  "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
  },
  "mark": {
    "labelPosition": "top"
  }
}

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.position.md.

LibraryStatusOptionVerificationSource
Chart.jsplugin—anchor / alignnpm · weak—
RechartsnativeLabelList.positiontypes · strongrecharts/types/component/LabelList.d.ts:86
Apache EChartsnativeseries.label.positiontypes · strongecharts/types/dist/shared.d.ts:7876
HighchartsnativeplotOptions.series.dataLabels.align, plotOptions.series.dataLabels.insidetypes · stronghighcharts/options/series.d.ts:127
Plotly.jsnativetrace.textpositiontypes · strongplot-schema.json#traces.{bar,funnel,funnelarea,histogram,icicle,pie,…}.attributes.textposition
NivonativeBar.labelPositiontypes · strong@nivo/bar/dist/types/types.d.ts:156
VictorynativeVictoryBar.labelComponenttypes · strongvictory-core/lib/types/prop-types.d.ts:114
visxmanualGroupmechanism · weak@visx/group/lib/Group.d.ts:15
ApexChartsnativeplotOptions.bar.dataLabels.positiontypes · strongapexcharts/types/apexcharts.d.ts:3138
Tremor (npm)unknown—conflict · unknown—
Observable Plotnativegrep: dygrep · weak@observablehq/plot/src/scales.d.ts:45
Vega-Litenativegrep: aligngrep · weak93: "Align"
AG Chartsnativegrep: placementgrep · weakag-charts-types/dist/types/src/presets/quadrant/quadrantOptions.d.ts:2
amCharts 5nativegrep: locationYgrep · weak@amcharts/amcharts5/.internal/charts/xy/series/XYSeries.d.ts:141
Google Chartsunknown—conflict · unknown—
uPlotunknown—conflict · unknown—
TradingView Lightweight Chartsunknown—conflict · unknown—
MUI X Chartsnativegrep: barLabelPlacementgrep · weak@mui/x-charts/SparkLineChart/SparkLineChart.d.ts:14
Mermaid (chart-ish diagrams only)nativeMermaidConfig.pie.textPositiontypes · strongmermaid/dist/config.type.d.ts:938
AntV G2nativegrep: positiongrep · weak@antv/g2/lib/index.d.ts:2