diff options
author | Naafiyan Ahmed <naafiyan@gmail.com> | 2022-07-25 19:10:55 -0400 |
---|---|---|
committer | Naafiyan Ahmed <naafiyan@gmail.com> | 2022-07-25 19:10:55 -0400 |
commit | ba8cb4194062b0f939afd136a269625f9f26dcaa (patch) | |
tree | 7fead1b076faa4576eeae0474db365c9c8c2b88e /src/client/views/nodes/DataVizBox/ChartInterface.ts | |
parent | 9730011a61bb3b1522ac59f12a26fbd36f7917a0 (diff) |
cleaned up code and moved files around
Diffstat (limited to 'src/client/views/nodes/DataVizBox/ChartInterface.ts')
-rw-r--r-- | src/client/views/nodes/DataVizBox/ChartInterface.ts | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/src/client/views/nodes/DataVizBox/ChartInterface.ts b/src/client/views/nodes/DataVizBox/ChartInterface.ts new file mode 100644 index 000000000..6e37f966c --- /dev/null +++ b/src/client/views/nodes/DataVizBox/ChartInterface.ts @@ -0,0 +1,33 @@ +import { Doc } from '../../../../fields/Doc'; +import { DataPoint } from './ChartBox'; +import { LineChart } from './components/LineChart'; + +export interface Chart { + tooltipContent: (data: DataPoint) => string; + drawChart: () => void; + height: number; + width: number; +} + +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[][]; +} |