Features · axis

Axis pointer label

native

Value label on the axis following the cursor

Matrix status native. Verification runtime · strong. ChartKit option: ChartKitChartSpecV1.tooltip.crosshairLabel.

tooltip.crosshairLabel prints the hovered x value on the guide, at the axis edge.

Source: packages/core/src/interact.ts

ChartKit spec

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

Units rose in Q2.Units rose in Q2.40455055Q1Q2
{
  "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
  },
  "tooltip": {
    "crosshairLabel": 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: axis.crosshair.label.md.

LibraryStatusOptionVerificationSource
Chart.jsplugin—npm · weak—
Rechartsnone—absence · absence—
Apache EChartsnativeaxisPointer.label, xAxis.axisPointertypes · strongecharts/types/dist/shared.d.ts:8181
HighchartsnativexAxis.crosshair.labeltypes · stronghighcharts/highcharts.d.ts:5279
Plotly.jsnativelayout.xaxis.showspikestypes · strongplot-schema.json#layout.layoutAttributes.xaxis.showspikes
Nivonone—absence · absence—
VictorynativeVictoryCursorContainer.cursorLabeltypes · strongvictory-cursor-container/lib/victory-cursor-container.d.ts:7
visxnone—absence · absence—
ApexChartsnativexaxis.crosshairs, xaxis.tooltiptypes · strongapexcharts/types/apexcharts.d.ts:4992
Tremor (npm)none—absence · absence—
Observable PlotnativecrosshairXcrosshair mark shows axis valuestypes · strong@observablehq/plot/src/marks/crosshair.d.ts:74
Vega-Litenone—absence · absence—
AG Chartsnativegrep: crosshairgrep · weakag-charts-types/dist/types/src/main.d.ts:17
amCharts 5nativegrep: XYCursoraxis.tooltip shows value on axisgrep · weak@amcharts/amcharts5/xy.d.ts:3
Google Chartsnone—absence · absence—
uPlotnativeOptions.cursortypes · stronguplot/dist/uPlot.d.ts:390
TradingView Lightweight Chartsnativegrep: crosshairgrep · weak33: * Represents the crosshair mode.
MUI X ChartsnativeChartsAxisHighlighttypes · strong@mui/x-charts/ChartsAxisHighlight/ChartsAxisHighlight.d.mts:12
Mermaid (chart-ish diagrams only)none—absence · absence—
AntV G2nativegrep: crosshairsgrep · weak@antv/g2/lib/runtime/types/mark.d.ts:30