useCrosshairPosition: (chart: ChartInstance) => CrosshairPosition | nullSubscribes to crosshair updates. Returns { time, x, y, distance } while the user is hovering the chart, or null when no hover is active. Re-renders only when the crosshair changes — safe to use in heavy custom overlays.
import { useChartInstance, useCrosshairPosition } from '@wick-charts/react'; function HoverReadout() { const chart = useChartInstance(); const pos = useCrosshairPosition(chart); if (!pos) return null; return <span>t = {new Date(pos.time).toISOString()}, y = {pos.y.toFixed(2)}</span>;}