import { Point2D, Range2D } from '../../utilities'; import { GenericPlotProps } from '../plot/types'; /** * The properties of a line plot. * @member onClick raised when the line is clicked. * @member onMouseOver raised when the line is moused over. * @member onMouseOut raised when the line is moused out. */ export interface LineProps extends GenericPlotProps { onClick?: () => void; onMouseOver?: () => void; onMouseOut?: () => void; } /** * The properties of a line plot rendering data points at constant steps in the x dimension. * @member domain the domain of the plot in both the X and Y dimensions; should be passed by the PlotArea parent. * @member data the data to plot; equally-spaced Y values. * @member transform function for mapping data points into the parent's coordinate space. The parent PlotArea will pass this. * @member onClick raised when the line is clicked. * @member onMouseOver raised when the line is moused over. * @member onMouseOut raised when the line is moused out. */ export interface XLineProps { domain: Range2D; data: number[]; transform?: (point: Point2D) => Point2D; onClick?: () => void; onMouseOver?: () => void; onMouseOut?: () => void; [key: string]: any; }