import { Doc } from '../../../../fields/Doc'; import { PinProps } from '../trails'; import { DataPoint } from './ChartBox'; export interface Chart { tooltipContent: (data: DataPoint) => string; drawChart: () => void; restoreView: (data: any) => boolean; height: number; width: number; // TODO: nda - probably want to get rid of this to keep charts more generic _getAnchor: (pinProps?: PinProps) => Doc; } export interface ChartProps { chartData: ChartData; width: number; height: number; dataDoc: Doc; fieldKey: string; // returns linechart component but should be generic chart setCurrChart: (chart: Chart) => void; getAnchor: () => Doc; margin: { top: number; right: number; bottom: number; left: number; }; } export interface ChartData { xLabel: string; yLabel: string; data: DataPoint[][]; }