Features · tooltip

Crosshair / guide line

native

Vertical (and horizontal) guide line following the cursor

Matrix status native. Verification types · strong. ChartKit option: ChartKitChartSpecV1.tooltip.crosshair, ChartKitChartSpecV1.tooltip.crosshairLabel.

tooltip.crosshair draws the guide. tooltip.crosshairLabel prints the x value on it.

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

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": {
    "crosshair": 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: tooltip.crosshair.md.

LibraryStatusOptionVerificationSource
Chart.jsplugin—npm · weak—
RechartsnativeTooltip.cursortypes · strongrecharts/types/component/Tooltip.d.ts:77
Apache EChartsnativetooltip.axisPointer.type'line' | 'cross' | 'shadow'types · strongecharts/types/dist/shared.d.ts:6795
HighchartsnativexAxis.crosshair, yAxis.crosshairtypes · stronghighcharts/highcharts.d.ts:108188
Plotly.jsnativelayout.xaxis.showspikes, layout.spikedistancetypes · strongplot-schema.json#layout.layoutAttributes.xaxis.showspikes
NivonativeLine.enableCrosshair, Line.crosshairTypetypes · strong@nivo/line/dist/types/types.d.ts:183
VictorynativeVictoryCursorContainertypes · strongvictory-cursor-container/lib/victory-cursor-container.d.ts:73
visxnativegrep: showVerticalCrosshairgrep · weak@visx/xychart/lib/components/Tooltip.d.ts:26
ApexChartsnativexaxis.crosshairs.showtypes · strongapexcharts/types/apexcharts.d.ts:4993
Tremor (npm)none—absence · absence—
Observable Plotnativecrosshair, crosshairXtypes · strong@observablehq/plot/src/marks/crosshair.d.ts:65
Vega-Litepartialgrep: rulerule + selection recipegrep · weak164: "description"
AG Chartsnativegrep: crosshairgrep · weakag-charts-types/dist/types/src/main.d.ts:17
amCharts 5nativeXYCursortypes · strong@amcharts/amcharts5/.internal/charts/xy/XYCursor.d.ts:166
Google Chartsnativegrep: crosshairgrep · weak@types/google.visualization/index.d.ts:452
uPlotnativeOptions.cursortypes · stronguplot/dist/uPlot.d.ts:390
TradingView Lightweight Chartsnativegrep: crosshairCrosshairModegrep · 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