Features · annotation

Annotation label placement

native

Where an annotation's label sits

Matrix status native. Verification types · strong. ChartKit option: ChartKitChartSpecV1.annotations.

labelPosition start|center|end

Source: chartkit:packages/core/src/generated/schema.ts:69

ChartKit spec

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

Units rose in Q2.Units rose in Q2.Mark40455055Q1Q2
{
  "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
  },
  "annotations": [
    {
      "type": "rule",
      "axis": "y",
      "value": 50,
      "label": "Mark"
    }
  ]
}

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: annotation.label.position.md.

LibraryStatusOptionVerificationSource
Chart.jsplugin—npm · weak—
RechartsnativeReferenceLine.labeltypes · strongrecharts/types/cartesian/ReferenceLine.d.ts:102
Apache EChartsnativegrep: positionmarkLine.label.positiongrep · weakecharts/types/dist/shared.d.ts:63
Highchartsnativegrep: alignplotLines.label.aligngrep · weakhighcharts/highcharts.src.d.ts:147
Plotly.jsnativegrep: xanchorgrep · weak@types/plotly.js/index.d.ts:587
Nivounknown—conflict · unknown—
VictorymanualVictoryBarProps.dataComponentmechanism · weakvictory-core/lib/victory-util/common-props.d.ts:9
visxnativeLabeltypes · strong@visx/annotation/lib/components/Label.d.ts:59
ApexChartsnativegrep: positiongrep · weakapexcharts/types/unit-shapes.d.ts:48
Tremor (npm)none—absence · absence—
Observable Plotnativegrep: textAnchorgrep · weak@observablehq/plot/src/mark.d.ts:18
Vega-Litenativegrep: aligngrep · weak93: "Align"
AG Chartsnativegrep: positiongrep · weakag-charts-community/dist/types/src/module-support.d.ts:42
amCharts 5nativegrep: centerXgrep · weak@amcharts/amcharts5/.internal/charts/xy/series/XYSeries.d.ts:140
Google Chartsnone—absence · absence—
uPlotnone—absence · absence—
TradingView Lightweight Chartsnativegrep: axisLabelVisiblegrep · weak2241: * axisLabelVisible
MUI X Chartsnativegrep: labelAligngrep · weak@mui/x-charts/internals/useDefaultTickLabelStyle.d.ts:7
Mermaid (chart-ish diagrams only)unknown—conflict · unknown—
AntV G2nativegrep: positiongrep · weak@antv/g2/lib/index.d.ts:2