import React from 'react'; import { Point2D } from '../../utilities'; /** * The properties of a histogram plot. * @member onBarClick receives the index of a clicked bin in the data array. * @member onBarMouseOver receives the index of a moused over bin in the data array. * @member onBarMouseOut receives the index of a moused out bin in the data array. * @member barStyle if set, default props passed to each bar's element; may be overridden by each individual bin. */ export interface HistogramProps { onBarClick?: (i: number, event: React.MouseEvent) => void; onBarMouseOver?: (i: number, event: React.MouseEvent) => void; onBarMouseOut?: (i: number, event: React.MouseEvent) => void; barStyle?: { [key: string]: any; }; transform: (x: Point2D) => Point2D; data: { bin: number; count: number; barProps?: React.SVGProps; }[]; [key: string]: any; }