UNPKG

react-plot

Version:

Library of React components to render SVG 2D plots.

39 lines 1.23 kB
interface PlotAxisOverrides { min: number | null; max: number | null; } export type PlotAxesOverrides = Record<string, PlotAxisOverrides>; export interface PlotOverridesState { axes: PlotAxesOverrides; } export interface PlotControls { /** * Override the min/max of an axis. * @param axisId Id of the axis to override. * @param override Value to override. */ setAxis: (axisId: string, override: PlotAxisOverrides) => void; /** * Reset an overridden axis. * @param axisId Id of the axis to reset. */ resetAxis: (axisId: string) => void; /** * Override the min/max of multiple axes. * @param axisId Id of the axis to override. * @param overrides Dictionary of axes to override. */ setAxes: (overrides: Record<string, PlotAxisOverrides>) => void; /** * Reset multiple overridden axes. * @param axisIds Ids of the axes to reset. */ resetAxes: (axisIds: string[]) => void; } export declare const initialPlotOverridesState: PlotOverridesState; export declare function usePlotOverridesState(): { overrides: PlotOverridesState; controls: PlotControls; }; export {}; //# sourceMappingURL=usePlotOverrides.d.ts.map