ChartOverlayX is an invisible overlay that tracks the cursor
position on a chart, often used to add tooltips or other annotations
that depend only on the x-coordinate being hovered.
The parent component can store the currently hovered date in a state variable,
which will be updated using the onMouseMove and onMouseLeave callbacks.
See useHoveredDate for a React hook used to keep track of the point being hovered.
ChartOverlayX is an invisible overlay that tracks the cursor position on a chart, often used to add tooltips or other annotations that depend only on the x-coordinate being hovered.
The parent component can store the currently hovered date in a state variable, which will be updated using the
onMouseMove
andonMouseLeave
callbacks.See useHoveredDate for a React hook used to keep track of the point being hovered.