From c917a3f71ae6ea3711dcd0b61924c7e7d7550e8c Mon Sep 17 00:00:00 2001 From: Andrea Puccio Date: Tue, 7 Apr 2020 04:29:59 +0200 Subject: [PATCH] Series Gauge missing field data (#43673) * series gauge data field * . * . Co-authored-by: Andrea Puccio --- types/echarts/options/series/gauge.d.ts | 39 +++++++++++++++++++++++++ 1 file changed, 39 insertions(+) diff --git a/types/echarts/options/series/gauge.d.ts b/types/echarts/options/series/gauge.d.ts index 48a29a3987..d34f086b11 100644 --- a/types/echarts/options/series/gauge.d.ts +++ b/types/echarts/options/series/gauge.d.ts @@ -88,6 +88,25 @@ declare namespace echarts { */ clockwise?: boolean; + /** + * Data array of series, which can be a single data value. + * + * [see doc](https://echarts.apache.org/en/option.html#series-gauge.data) + * + * Or, if need extra dimensions for components like [visualMap](https://echarts.apache.org/en/option.html#visualMap) + * to map to graphic attributes like color, it can also be in the form of array. + * + * In this case, we can assigin the second value in each arrary item to [visualMap](https://echarts.apache.org/en/option.html#visualMap) component. + * More likely, we need to assign name to each data item, in which case each item should be an object: + * + * + * @see https://echarts.apache.org/en/option.html#series-gauge.data + */ + data?: ( + (void | string | number | SeriesGauge.DataObject)[] + | (void | string | number | SeriesGauge.DataObject)[][] + ); + /** * The minimum data value which map to * [minAngle](https://echarts.apache.org/en/option.html#series-gauge.minAngle) @@ -14300,5 +14319,25 @@ declare namespace echarts { extraCssText?: string; }; } + + namespace SeriesGauge { + interface DataObject { + /** + * The name of data item. + * + * + * @see https://echarts.apache.org/en/option.html#series-gauge.data.name + */ + name?: string; + + /** + * The value of a single data item. + * + * + * @see https://echarts.apache.org/en/option.html#series-gauge.data.value + */ + value?: number; + } + } } }