recharts
Version:
React charts
18 lines (17 loc) • 1.01 kB
TypeScript
import { Reducer } from '@reduxjs/toolkit';
import { ZoomLimits } from '../util/zoom/zoomActions';
import { ZoomAxis } from '../util/zoom/ZoomOptions';
/**
* Chart-level zoom configuration shared across zoom consumers.
*
* The geometric state (the viewport itself) lives in the `zoom` slice; this one holds the
* configuration registered by the chart's zoom setup (`<ZoomAndPan />` or the `zoom` prop), so
* window editors that come with their own defaults - Brush zoom mode, Minimap - can fall back to
* the chart-wide `minZoom`/`maxZoom` instead of silently using different limits.
*/
export type ZoomSettingsState = {
limits: ZoomLimits | null;
axis: ZoomAxis | null;
};
export declare const setZoomAxis: import("@reduxjs/toolkit").ActionCreatorWithPayload<ZoomAxis | null, "zoomSettings/setZoomAxis">, setZoomLimits: import("@reduxjs/toolkit").ActionCreatorWithPayload<ZoomLimits | null, "zoomSettings/setZoomLimits">;
export declare const zoomSettingsReducer: Reducer<ZoomSettingsState>;