diff --git a/src/shared/charts/candleChartSeries.ts b/src/shared/charts/candleChartSeries.ts index 4c3b1905..648875d2 100644 --- a/src/shared/charts/candleChartSeries.ts +++ b/src/shared/charts/candleChartSeries.ts @@ -1,15 +1,17 @@ import { IndicatorConfig } from '@/types'; -import { SeriesOption } from 'echarts'; +import { BarSeriesOption, LineSeriesOption, ScatterSeriesOption } from 'echarts'; import randomColor from '../randomColor'; +export type SupportedSeriesTypes = LineSeriesOption | BarSeriesOption | ScatterSeriesOption; + export function generateCandleSeries( colDate: number, col: number, key: string, value: IndicatorConfig, axis = 0, -): SeriesOption { - const sp: SeriesOption = { +): SupportedSeriesTypes { + const sp: SupportedSeriesTypes = { name: key, type: value.type || 'line', xAxisIndex: axis,