UNPKG

recharts

Version:
24 lines (23 loc) • 1.27 kB
import { RechartsRootState } from '../store'; import { AxisViewport } from '../../util/zoom/viewport'; import { ZoomDimension, ZoomState } from '../zoomSlice'; /** * Selects the whole zoom state. Defaults to the full viewport on both dimensions. */ export declare const selectZoom: (state: RechartsRootState) => ZoomState; /** * Selects the current viewport for a single dimension. */ export declare const selectAxisViewport: (state: RechartsRootState, dimension: ZoomDimension) => AxisViewport; /** * Returns `true` when the chart is zoomed on either dimension, `false` when fully zoomed out. * Useful as a cheap gate before doing any zoom-related work. */ export declare const selectIsZoomed: (state: RechartsRootState) => boolean; /** * The chart-level zoom limits registered by the chart's zoom setup (`<ZoomAndPan />` / the `zoom` * prop), or `null` when none registered. Window editors (Brush zoom mode, Minimap) fall back to * these when they get no explicit `minZoom`/`maxZoom` props. */ export declare const selectSharedZoomLimits: (state: RechartsRootState) => import("../../util/zoom/zoomActions").ZoomLimits | null; export declare const selectSharedZoomAxis: (state: RechartsRootState) => import("../../util/zoom/ZoomOptions").ZoomAxis | null;