mirror of
https://github.com/freqtrade/frequi.git
synced 2024-11-11 02:33:51 +00:00
Improve plot helper typing
This commit is contained in:
parent
77952ec2c9
commit
7d2be4e6df
|
@ -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,
|
||||
|
|
Loading…
Reference in New Issue
Block a user