Features · annotation

Horizontal reference line

native

Line at a y value (target, threshold)

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

{type:'rule', axis:'y', value}

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.line.y.md.

LibraryStatusOptionVerificationSource
Chart.jsplugin—npm · weak—
RechartsnativeReferenceLinetypes · strongrecharts/types/cartesian/ReferenceLine.d.ts:156
Apache EChartsnativeseries.markLinetypes · strongecharts/types/dist/shared.d.ts:12499
HighchartsnativeyAxis.plotLinestypes · stronghighcharts/highcharts.d.ts:110516
Plotly.jsnativelayout.shapestypes · strongplot-schema.json#layout.layoutAttributes.shapes
NivonativeLine.markersmarkers axis:'y'types · strong@nivo/line/dist/types/types.d.ts:186
VictorymanualVictoryBarProps.dataComponentVictoryLine with constant datamechanism · weakvictory-core/lib/victory-util/common-props.d.ts:9
visxmanualGroupLine + scalemechanism · weak@visx/group/lib/Group.d.ts:15
ApexChartsnativeannotations.yaxistypes · strongapexcharts/types/apexcharts.d.ts:2658
Tremor (npm)none—no reference linesabsence · absence—
Observable PlotnativeruleYtypes · strong@observablehq/plot/src/marks/rule.d.ts:137
Vega-Litenativemark=ruletypes · strongvega-lite/build/spec/unit.d.ts:19
AG Chartsnativegrep: crossLinesaxes[].crossLines type 'line'grep · weakag-charts-enterprise/dist/types/src/main.d.ts:9
amCharts 5nativegrep: createAxisRangegrep · weak@amcharts/amcharts5/radar.d.ts:5
Google Chartsnone—use an extra seriesabsence · absence—
uPlotmanualOptions.hookshooks drawmechanism · weakuplot/dist/uPlot.d.ts:394
TradingView Lightweight Chartsnativegrep: createPriceLinegrep · weak2531: * const priceLine = series.createPriceLine({
MUI X ChartsnativeChartsReferenceLinetypes · strong@mui/x-charts/ChartsReferenceLine/ChartsReferenceLine.d.mts:5
Mermaid (chart-ish diagrams only)none—absence · absence—
AntV G2nativeMarkTypes=lineYtypes · strong@antv/g2/lib/spec/mark.d.ts:13