diff --git a/frontend/src/views/chat/component/BaseChart.ts b/frontend/src/views/chat/component/BaseChart.ts new file mode 100644 index 0000000..4a24d12 --- /dev/null +++ b/frontend/src/views/chat/component/BaseChart.ts @@ -0,0 +1,32 @@ +export interface ChartAxis { + name: string + value: string + type?: 'x' | 'y' | 'series' +} + +export interface ChartData { + [key: string]: any +} + +export type ChartTypes = 'table' | 'bar' | 'column' | 'line' | 'pie' + +export abstract class BaseChart { + id: string + _name: string = 'base-chart' + axis: Array = [] + data: Array = [] + + constructor(id: string, name: string) { + this.id = id + this._name = name + } + + init(axis: Array, data: Array): void { + this.axis = axis + this.data = data + } + + abstract render(): void + + abstract destroy(): void +}