Text annotation at a data point
native
Label pinned to data coordinates
Matrix status native. Verification types · strong. ChartKit option: ChartKitChartSpecV1.annotations.
{type:'text', x, y, label}
Source: chartkit:packages/core/src/generated/schema.ts:69
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
},
"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.text.md.
| Library | Status | Option | Verification | Source |
|---|---|---|---|---|
| Chart.js | plugin | — | npm · weak | — |
| Recharts | native | ReferenceDot, Label | types · strong | recharts/types/cartesian/ReferenceDot.d.ts:137 |
| Apache ECharts | native | series.markPoint | types · strong | echarts/types/dist/shared.d.ts:12500 |
| Highcharts | native | grep: annotationsannotations module labels | grep · weak | highcharts/highcharts.src.d.ts:162 |
| Plotly.js | native | layout.annotations | types · strong | plot-schema.json#layout.layoutAttributes.annotations |
| Nivo | native | Line.markers | types · strong | @nivo/line/dist/types/types.d.ts:186 |
| Victory | native | VictoryLabel | types · strong | victory-core/lib/victory-label/victory-label.d.ts:54 |
| visx | native | Annotation, Label | types · strong | @visx/annotation/lib/components/Annotation.d.ts:7 |
| ApexCharts | native | annotations.points | types · strong | apexcharts/types/apexcharts.d.ts:2660 |
| Tremor (npm) | none | — | 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 | grep: annotationsenterprise annotations / crossLines label | grep · weak | ag-charts-types/dist/types/src/main.d.ts:7 |
| amCharts 5 | native | grep: Label | grep · weak | @amcharts/amcharts5/stock.d.ts:55 |
| Google Charts | native | grep: annotationannotation role column | grep · weak | @types/google.visualization/index.d.ts:402 |
| uPlot | manual | Options.hooks | mechanism · weak | uplot/dist/uPlot.d.ts:394 |
| TradingView Lightweight Charts | native | grep: createSeriesMarkers | grep · weak | 274: * import { createSeriesMarkers } from 'lightweight-charts'; |
| MUI X Charts | manual | ChartsContainer | mechanism · weak | @mui/x-charts/ChartsContainer/ChartsContainer.d.mts:34 |
| Mermaid (chart-ish diagrams only) | unknown | — | conflict · unknown | — |
| AntV G2 | native | MarkTypes=text | types · strong | @antv/g2/lib/spec/mark.d.ts:13 |