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.
{
"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.
| Library | Status | Option | Verification | Source |
|---|---|---|---|---|
| Chart.js | plugin | — | npm · weak | — |
| Recharts | native | Tooltip.cursor | types · strong | recharts/types/component/Tooltip.d.ts:77 |
| Apache ECharts | native | tooltip.axisPointer.type'line' | 'cross' | 'shadow' | types · strong | echarts/types/dist/shared.d.ts:6795 |
| Highcharts | native | xAxis.crosshair, yAxis.crosshair | types · strong | highcharts/highcharts.d.ts:108188 |
| Plotly.js | native | layout.xaxis.showspikes, layout.spikedistance | types · strong | plot-schema.json#layout.layoutAttributes.xaxis.showspikes |
| Nivo | native | Line.enableCrosshair, Line.crosshairType | types · strong | @nivo/line/dist/types/types.d.ts:183 |
| Victory | native | VictoryCursorContainer | types · strong | victory-cursor-container/lib/victory-cursor-container.d.ts:73 |
| visx | native | grep: showVerticalCrosshair | grep · weak | @visx/xychart/lib/components/Tooltip.d.ts:26 |
| ApexCharts | native | xaxis.crosshairs.show | types · strong | apexcharts/types/apexcharts.d.ts:4993 |
| Tremor (npm) | none | — | absence · absence | — |
| Observable Plot | native | crosshair, crosshairX | types · strong | @observablehq/plot/src/marks/crosshair.d.ts:65 |
| Vega-Lite | partial | grep: rulerule + selection recipe | grep · weak | 164: "description" |
| AG Charts | native | grep: crosshair | grep · weak | ag-charts-types/dist/types/src/main.d.ts:17 |
| amCharts 5 | native | XYCursor | types · strong | @amcharts/amcharts5/.internal/charts/xy/XYCursor.d.ts:166 |
| Google Charts | native | grep: crosshair | grep · weak | @types/google.visualization/index.d.ts:452 |
| uPlot | native | Options.cursor | types · strong | uplot/dist/uPlot.d.ts:390 |
| TradingView Lightweight Charts | native | grep: crosshairCrosshairMode | grep · weak | 33: * Represents the crosshair mode. |
| MUI X Charts | native | ChartsAxisHighlight | types · strong | @mui/x-charts/ChartsAxisHighlight/ChartsAxisHighlight.d.mts:12 |
| Mermaid (chart-ish diagrams only) | none | — | absence · absence | — |
| AntV G2 | native | grep: crosshairs | grep · weak | @antv/g2/lib/runtime/types/mark.d.ts:30 |