react-plot
Version:
Library of React components to render SVG 2D plots.
20 lines • 736 B
TypeScript
import type { SeriesPoint } from '../types.js';
import type { ControllerHookOptions, DualAxisOptions, PathOptions } from './types.js';
export interface UseDrawPathOptions extends ControllerHookOptions, DualAxisOptions, PathOptions {
/**
* Callback on mouse move while drawing.
* */
onDraw?: (points: SeriesPoint[]) => void;
/**
* Callback when releasing mouse at end of drawing.
* */
onEnd?: (points: SeriesPoint[]) => void;
/**
* Close the path (link the first and last points).
* */
close?: boolean;
}
export declare function useDrawPath(options?: UseDrawPathOptions): {
annotations: import("react/jsx-runtime").JSX.Element | null;
};
//# sourceMappingURL=useDrawPath.d.ts.map