UNPKG

recharts

Version:
16 lines (15 loc) • 1.05 kB
import { AnyAction, ListenerMiddlewareInstance, ThunkDispatch } from '@reduxjs/toolkit'; import { RechartsRootState } from './store'; import { HTMLMousePointer } from '../util/types'; export declare const mouseClickAction: import("@reduxjs/toolkit").ActionCreatorWithPayload<HTMLMousePointer, string>; export declare const mouseClickMiddleware: ListenerMiddlewareInstance<RechartsRootState, ThunkDispatch<RechartsRootState, unknown, AnyAction>, unknown>; export declare const mouseMoveAction: import("@reduxjs/toolkit").ActionCreatorWithPayload<HTMLMousePointer, string>; /** * Creates the middleware that throttles mousemove events and turns them into tooltip updates. * * Each chart store must get its own instance, because the throttling state below belongs to one chart. * If it were shared, a mousemove in one chart would cancel the pending update of another chart. * * @returns a new listener middleware with its own throttling state */ export declare function createMouseMoveMiddleware(): ListenerMiddlewareInstance<RechartsRootState>;