From dd4a93f39bfdc8681890198c9c8451df4541ef19 Mon Sep 17 00:00:00 2001 From: theWorkFsz <45343728+theWorkFsz@users.noreply.github.com> Date: Tue, 17 Sep 2019 19:04:40 +0800 Subject: [PATCH] feat(echarts): add types for echarts (#38144) * feat(echarts): add types for echarts + lineStyle.color can be an string[] https://echarts.apache.org/zh/option.html#yAxis.splitLine.lineStyle.color + cartesianAxis.min/max can be a function https://echarts.apache.org/zh/option.html#yAxis.min * docs(echarts): change reference link * docs(echarts): fix yAxis.max reference link * style(echarts): add space before `number` --- types/echarts/index.d.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/types/echarts/index.d.ts b/types/echarts/index.d.ts index f71ab98471..d39f3729d6 100644 --- a/types/echarts/index.d.ts +++ b/types/echarts/index.d.ts @@ -1170,9 +1170,9 @@ declare namespace echarts { * Moreover, it can be set as negative number, like `-3`. * * @default null - * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#yAxis.min + * @see https://echarts.apache.org/option.html#yAxis.min */ - min?: number | string; + min?: number | string | ((value: { min: number, max: number }) => number); /** * The maximum value of axis. @@ -1187,9 +1187,9 @@ declare namespace echarts { * Moreover, it can be set as negative number, like `-3`. * * @default null - * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#yAxis.max + * @see https://echarts.apache.org/option.html#yAxis.max */ - max?: number | string; + max?: number | string | ((value: { min: number, max: number } ) => number); /** * It is available only in numerical axis, i.e., type: `'value'`.