useChartState
Subscribes to chart state (layout, visible range, crosshair...).
import { useChartState } from "@reincharts/core";Subscribes to chart state (layout, visible range, crosshair...). Re-renders only when the selection changes.
Signature
function useChartState<S>(selector: (state: ChartState) => S, isEqual?: (a: S, b: S) => boolean): SSee also
- Events (example)
- Custom tooltip (example)