Fix data fields for echarts series option

Problem:
official documentation provides inconsistent info about types
so the fix bases on examples and source code
This commit is contained in:
Konch Roman
2018-11-06 17:51:07 +03:00
parent aa2b6a7eb0
commit 3353277ce4
22 changed files with 29193 additions and 29075 deletions
+2 -2
View File
@@ -1307,7 +1307,7 @@ declare namespace echarts {
*
* @see https://ecomfe.github.io/echarts-doc/public/en/option.html#yAxis.data
*/
data?: Axis.Data[];
data?: (string | Axis.DataObject)[];
/**
* axisPointer settings on the axis.
@@ -1488,7 +1488,7 @@ declare namespace echarts {
/**
* @todo describe
*/
interface Data {
interface DataObject {
value?: string;
textStyle?: TextStyle;
}
+5 -2
View File
@@ -2315,7 +2315,10 @@ declare namespace echarts {
*
* @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.data
*/
data?: SeriesBar.Data | SeriesBar.Data[];
data?: (
(void | string | number | SeriesBar.DataObject)[]
| (void | string | number | SeriesBar.DataObject)[][]
);
/**
* Mark point in a chart.
@@ -14418,7 +14421,7 @@ declare namespace echarts {
}
namespace SeriesBar {
interface Data {
interface DataObject {
/**
* The name of data item.
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
+616 -609
View File
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
+2526 -2518
View File
File diff suppressed because it is too large Load Diff
+2339 -2335
View File
File diff suppressed because it is too large Load Diff
+1767 -1760
View File
File diff suppressed because it is too large Load Diff
+2274 -2267
View File
File diff suppressed because it is too large Load Diff
+1693 -1687
View File
File diff suppressed because it is too large Load Diff
+2255 -2251
View File
File diff suppressed because it is too large Load Diff
+238 -231
View File
@@ -487,237 +487,10 @@ declare namespace echarts {
*
* @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-parallel.data
*/
data?: {
/**
* The name of a data item.
*
*
* @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-parallel.data.name
*/
name?: string;
/**
* The value of a data item.
*
*
* @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-parallel.data.value
*/
value?: any[];
/**
* Line style.
*
*
* @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-parallel.data.lineStyle
*/
lineStyle?: object;
/**
* Line color.
*
* > Color can be represented in RGB, for example `'rgb(128,
* 128, 128)'`.
* RGBA can be used when you need alpha channel, for example
* `'rgba(128, 128, 128, 0.5)'`.
* You may also use hexadecimal format, for example `'#ccc'`.
* Gradient color and texture are also supported besides single
* colors.
* >
* > [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-parallel.parallel.data)
*
*
* @default
* "#000"
* @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-parallel.data.color
*/
color?: string;
/**
* line width.
*
*
* @default
* 2
* @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-parallel.data.width
*/
width?: number;
/**
* line type.
*
* Options are:
*
* + `'solid'`
* + `'dashed'`
* + `'dotted'`
*
*
* @default
* "solid"
* @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-parallel.data.type
*/
type?: string;
/**
* Size of shadow blur.
* This attribute should be used along with `shadowColor`,`shadowOffsetX`,
* `shadowOffsetY` to set shadow to component.
*
* For example:
*
* [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-parallel.parallel.data)
*
*
* @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-parallel.data.shadowBlur
*/
shadowBlur?: number;
/**
* Shadow color. Support same format as `color`.
*
*
* @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-parallel.data.shadowColor
*/
shadowColor?: string;
/**
* Offset distance on the horizontal direction of shadow.
*
*
* @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-parallel.data.shadowOffsetX
*/
shadowOffsetX?: number;
/**
* Offset distance on the vertical direction of shadow.
*
*
* @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-parallel.data.shadowOffsetY
*/
shadowOffsetY?: number;
/**
* Opacity of the component.
* Supports value from 0 to 1, and the component will not be
* drawn when set to 0.
*
*
* @default
* 0.45
* @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-parallel.data.opacity
*/
opacity?: number;
/**
* @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-parallel.data.emphasis
*/
emphasis?: {
/**
* @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-parallel.data.emphasis.lineStyle
*/
lineStyle?: {
/**
* Line color.
*
* > Color can be represented in RGB, for example `'rgb(128,
* 128, 128)'`.
* RGBA can be used when you need alpha channel, for
* example `'rgba(128, 128, 128, 0.5)'`.
* You may also use hexadecimal format, for example
* `'#ccc'`.
* Gradient color and texture are also supported besides
* single colors.
* >
* > [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-parallel.parallel.data.emphasis.lineStyle)
*
*
* @default
* "#000"
* @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-parallel.data.emphasis.lineStyle.color
*/
color?: string;
/**
* line width.
*
*
* @default
* 2
* @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-parallel.data.emphasis.lineStyle.width
*/
width?: number;
/**
* line type.
*
* Options are:
*
* + `'solid'`
* + `'dashed'`
* + `'dotted'`
*
*
* @default
* "solid"
* @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-parallel.data.emphasis.lineStyle.type
*/
type?: string;
/**
* Size of shadow blur.
* This attribute should be used along with `shadowColor`,`shadowOffsetX`,
* `shadowOffsetY` to set shadow to component.
*
* For example:
*
* [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-parallel.parallel.data.emphasis.lineStyle)
*
*
* @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-parallel.data.emphasis.lineStyle.shadowBlur
*/
shadowBlur?: number;
/**
* Shadow color. Support same format as `color`.
*
*
* @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-parallel.data.emphasis.lineStyle.shadowColor
*/
shadowColor?: string;
/**
* Offset distance on the horizontal direction of shadow.
*
*
* @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-parallel.data.emphasis.lineStyle.shadowOffsetX
*/
shadowOffsetX?: number;
/**
* Offset distance on the vertical direction of shadow.
*
*
* @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-parallel.data.emphasis.lineStyle.shadowOffsetY
*/
shadowOffsetY?: number;
/**
* Opacity of the component.
* Supports value from 0 to 1, and the component will
* not be drawn when set to 0.
*
*
* @default
* 0.45
* @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-parallel.data.emphasis.lineStyle.opacity
*/
opacity?: number;
};
};
};
data?: (
(number | string | SeriesParallel.DataObject)[]
| (number | string | SeriesParallel.DataObject)[][]
);
/**
* `zlevel` value of all graghical elements in parallel.
@@ -1325,5 +1098,239 @@ declare namespace echarts {
extraCssText?: string;
};
}
namespace SeriesParallel {
interface DataObject {
/**
* The name of a data item.
*
*
* @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-parallel.data.name
*/
name?: string;
/**
* The value of a data item.
*
*
* @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-parallel.data.value
*/
value?: any[];
/**
* Line style.
*
*
* @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-parallel.data.lineStyle
*/
lineStyle?: object;
/**
* Line color.
*
* > Color can be represented in RGB, for example `'rgb(128,
* 128, 128)'`.
* RGBA can be used when you need alpha channel, for example
* `'rgba(128, 128, 128, 0.5)'`.
* You may also use hexadecimal format, for example `'#ccc'`.
* Gradient color and texture are also supported besides single
* colors.
* >
* > [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-parallel.parallel.data)
*
*
* @default
* "#000"
* @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-parallel.data.color
*/
color?: string;
/**
* line width.
*
*
* @default
* 2
* @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-parallel.data.width
*/
width?: number;
/**
* line type.
*
* Options are:
*
* + `'solid'`
* + `'dashed'`
* + `'dotted'`
*
*
* @default
* "solid"
* @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-parallel.data.type
*/
type?: string;
/**
* Size of shadow blur.
* This attribute should be used along with `shadowColor`,`shadowOffsetX`,
* `shadowOffsetY` to set shadow to component.
*
* For example:
*
* [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-parallel.parallel.data)
*
*
* @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-parallel.data.shadowBlur
*/
shadowBlur?: number;
/**
* Shadow color. Support same format as `color`.
*
*
* @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-parallel.data.shadowColor
*/
shadowColor?: string;
/**
* Offset distance on the horizontal direction of shadow.
*
*
* @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-parallel.data.shadowOffsetX
*/
shadowOffsetX?: number;
/**
* Offset distance on the vertical direction of shadow.
*
*
* @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-parallel.data.shadowOffsetY
*/
shadowOffsetY?: number;
/**
* Opacity of the component.
* Supports value from 0 to 1, and the component will not be
* drawn when set to 0.
*
*
* @default
* 0.45
* @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-parallel.data.opacity
*/
opacity?: number;
/**
* @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-parallel.data.emphasis
*/
emphasis?: {
/**
* @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-parallel.data.emphasis.lineStyle
*/
lineStyle?: {
/**
* Line color.
*
* > Color can be represented in RGB, for example `'rgb(128,
* 128, 128)'`.
* RGBA can be used when you need alpha channel, for
* example `'rgba(128, 128, 128, 0.5)'`.
* You may also use hexadecimal format, for example
* `'#ccc'`.
* Gradient color and texture are also supported besides
* single colors.
* >
* > [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-parallel.parallel.data.emphasis.lineStyle)
*
*
* @default
* "#000"
* @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-parallel.data.emphasis.lineStyle.color
*/
color?: string;
/**
* line width.
*
*
* @default
* 2
* @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-parallel.data.emphasis.lineStyle.width
*/
width?: number;
/**
* line type.
*
* Options are:
*
* + `'solid'`
* + `'dashed'`
* + `'dotted'`
*
*
* @default
* "solid"
* @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-parallel.data.emphasis.lineStyle.type
*/
type?: string;
/**
* Size of shadow blur.
* This attribute should be used along with `shadowColor`,`shadowOffsetX`,
* `shadowOffsetY` to set shadow to component.
*
* For example:
*
* [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-parallel.parallel.data.emphasis.lineStyle)
*
*
* @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-parallel.data.emphasis.lineStyle.shadowBlur
*/
shadowBlur?: number;
/**
* Shadow color. Support same format as `color`.
*
*
* @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-parallel.data.emphasis.lineStyle.shadowColor
*/
shadowColor?: string;
/**
* Offset distance on the horizontal direction of shadow.
*
*
* @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-parallel.data.emphasis.lineStyle.shadowOffsetX
*/
shadowOffsetX?: number;
/**
* Offset distance on the vertical direction of shadow.
*
*
* @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-parallel.data.emphasis.lineStyle.shadowOffsetY
*/
shadowOffsetY?: number;
/**
* Opacity of the component.
* Supports value from 0 to 1, and the component will
* not be drawn when set to 0.
*
*
* @default
* 0.45
* @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-parallel.data.emphasis.lineStyle.opacity
*/
opacity?: number;
};
};
}
}
}
}
File diff suppressed because it is too large Load Diff
+6 -2
View File
@@ -2257,7 +2257,11 @@ declare namespace echarts {
*
* @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-pie.data
*/
data?: SeriesPie.Data | SeriesPie.Data[];
data?: (
number[]
| number[][]
| SeriesPie.DataObject[]
);
/**
* Mark point in a chart.
@@ -13914,7 +13918,7 @@ declare namespace echarts {
}
namespace SeriesPie {
interface Data {
interface DataObject {
/**
* The name of data item.
+613 -609
View File
File diff suppressed because it is too large Load Diff
+797 -790
View File
File diff suppressed because it is too large Load Diff
+2306 -2299
View File
File diff suppressed because it is too large Load Diff
+4047 -4043
View File
File diff suppressed because it is too large Load Diff
+58 -51
View File
@@ -1972,57 +1972,10 @@ declare namespace echarts {
*
* @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-themeRiver.data
*/
data?: {
/**
* the time attribute of time and theme.
*
*
* @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-themeRiver.data.date
*/
date?: string;
/**
* the value of an event or theme at a time point.
*
*
* @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-themeRiver.data.value
*/
value?: number;
/**
* the name of an event or theme.
*
* [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-themeRiver.themeRiver.data)
*
* **data specification:**
*
* As what is shown above, the data format of theme river is
* double dimensional array.
* Each item of the inner array consists of the time attribute
* , the value at a time point and the name of an event or theme.
* It needs to be noticed that you should provide an event or
* theme with a complete time quantum as main river.
* Other events and themes are based on the main river.
* The default value of time point should be set as 0.
* That is to say other events or themes are included in the
* main river.
* Once they are beyond the main river, the layout would be
* wrong.
* That is because a baseline should be calculated to draw each
* event as ribbon shape when the whole diagram layout is calculated.
* As the example above, the event "SS" is a main river.
* After dispose, we would complete these 3 default time points
* with the format of \["2015/11/08",0,"DQ"\], \["2015/11/12",0,"DQ"\],
* ["2015/11/13",0,"DQ"], making it align with the main river.
* From what is mentioned, we could set default value on any
* position of a complete time period.
*
*
* @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-themeRiver.data.name
*/
name?: string;
};
data?: (
(void | number | string | SeriesThemeRiver.DataObject)[]
| (void | number | string | SeriesThemeRiver.DataObject)[][]
);
/**
* tooltip settings in this series.
@@ -2480,5 +2433,59 @@ declare namespace echarts {
extraCssText?: string;
};
}
namespace SeriesThemeRiver {
interface DataObject {
/**
* the time attribute of time and theme.
*
*
* @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-themeRiver.data.date
*/
date?: string;
/**
* the value of an event or theme at a time point.
*
*
* @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-themeRiver.data.value
*/
value?: number | number[];
/**
* the name of an event or theme.
*
* [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-themeRiver.themeRiver.data)
*
* **data specification:**
*
* As what is shown above, the data format of theme river is
* double dimensional array.
* Each item of the inner array consists of the time attribute
* , the value at a time point and the name of an event or theme.
* It needs to be noticed that you should provide an event or
* theme with a complete time quantum as main river.
* Other events and themes are based on the main river.
* The default value of time point should be set as 0.
* That is to say other events or themes are included in the
* main river.
* Once they are beyond the main river, the layout would be
* wrong.
* That is because a baseline should be calculated to draw each
* event as ribbon shape when the whole diagram layout is calculated.
* As the example above, the event "SS" is a main river.
* After dispose, we would complete these 3 default time points
* with the format of \["2015/11/08",0,"DQ"\], \["2015/11/12",0,"DQ"\],
* ["2015/11/13",0,"DQ"], making it align with the main river.
* From what is mentioned, we could set default value on any
* position of a complete time period.
*
*
* @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-themeRiver.data.name
*/
name?: string;
}
}
}
}
+463 -458
View File
@@ -4186,7 +4186,468 @@ declare namespace echarts {
*
* @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-tree.data
*/
data?: {
data?: SeriesTree.DataObject[];
/**
* tooltip settings in this series.
*
*
* @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-tree.tooltip
*/
tooltip?: {
/**
*
* > **Notice:**series.tooltip only works when
* > [tooltip.trigger](https://ecomfe.github.io/echarts-doc/public/en/option.html#tooltip.trigger)
* > is `'item'`.
*
* The position of the tooltip's floating layer, which would
* follow the position of mouse by default.
*
* Options:
*
* + `Array`
*
* Display the position of tooltip's floating layer through
* array, which supports absolute position and relative percentage.
*
* Example:
*
* [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-tree.tree.tooltip)
*
* + `Function`
*
* Callback function in the following form:
*
* [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-tree.tree.tooltip)
*
* **Parameters:**
* point: Mouse position.
* param: The same as formatter.
* dom: The DOM object of tooltip.
* rect: It is valid only when mouse is on graphic elements,
* which stands for a bounding box with `x`, `y`, `width`, and
* `height`.
* size: The size of dom echarts container.
* For example: `{contentSize: [width, height], viewSize: [width,
* height]}`.
*
* **Return:**
* Return value is an array standing for tooltip position, which
* can be absolute pixels, or relative percentage.
* Or can be an object, like `{left: 10, top: 30}`, or `{right:
* '20%', bottom: 40}`.
*
* For example:
*
* [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-tree.tree.tooltip)
*
* Or:
*
* [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-tree.tree.tooltip)
*
* + `'inside'`
*
* Center position of the graphic element where the mouse is
* in, which is only valid when
* [trigger](https://ecomfe.github.io/echarts-doc/public/en/option.html#tooltip.trigger)
* is `'item'`.
*
* + `'top'`
*
* Top position of the graphic element where the mouse is in,
* which is only valid when
* [trigger](https://ecomfe.github.io/echarts-doc/public/en/option.html#tooltip.trigger)
* is `'item'`.
*
* + `'left'`
*
* Left position of the graphic element where the mouse is in,
* which is only valid when
* [trigger](https://ecomfe.github.io/echarts-doc/public/en/option.html#tooltip.trigger)
* is `'item'`.
*
* + `'right'`
*
* Right position of the graphic element where the mouse is
* in, which is only valid when
* [trigger](https://ecomfe.github.io/echarts-doc/public/en/option.html#tooltip.trigger)
* is `'item'`.
*
* + `'bottom'`
*
* Bottom position of the graphic element where the mouse is
* in, which is only valid when
* [trigger](https://ecomfe.github.io/echarts-doc/public/en/option.html#tooltip.trigger)
* is `'item'`.
*
*
* @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-tree.tooltip.position
*/
position?: any[] | string;
/**
*
* > **Notice:**series.tooltip only works when
* > [tooltip.trigger](https://ecomfe.github.io/echarts-doc/public/en/option.html#tooltip.trigger)
* > is `'item'`.
*
* The content formatter of tooltip's floating layer which supports
* string template and callback function.
*
* **1\. String template**
*
* The template variables are `{a}`, `{b}`, `{c}`, `{d}` and
* `{e}`, which stands for series name, data name and data value
* and ect. When
* [trigger](https://ecomfe.github.io/echarts-doc/public/en/option.html#tooltip.trigger)
* is set to be `'axis'`, there may be data from multiple series.
* In this time, series index can be refered as `{a0}`, `{a1}`,
* or `{a2}`.
*
* `{a}`, `{b}`, `{c}`, `{d}` have different meanings for different
* series types:
*
* + Line (area) charts, bar (column) charts, K charts: `{a}`
* for series name, `{b}` for category name, `{c}` for data
* value, `{d}` for none;
*
* + Scatter (bubble) charts: `{a}` for series name, `{b}` for
* data name, `{c}` for data value, `{d}` for none;
*
* + Map: `{a}` for series name, `{b}` for area name, `{c}`
* for merging data, `{d}` for none;
*
* + Pie charts, gauge charts, funnel charts: `{a}` for series
* name, `{b}` for data item name, `{c}` for data value, `{d}`
* for percentage.
*
* **Example:**
*
* ```
* formatter: '{b0}: {c0}<br />{b1}: {c1}'
*
* ```
*
* **2\. Callback function**
*
* The format of callback function:
*
* [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-tree.tree.tooltip)
*
* The first parameter `params` is the data that the formatter
* needs. Its format is shown as follows:
*
* [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-tree.tree.tooltip)
*
* When
* [trigger](https://ecomfe.github.io/echarts-doc/public/en/option.html#tooltip.trigger)
* is `'axis'`, or when tooltip is triggered by
* [axisPointer](https://ecomfe.github.io/echarts-doc/public/en/option.html#xAxis.axisPointer)
* , `params` is the data array of multiple series.
* The content of each item of the array is the same as above.
* Besides,
*
* [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-tree.tree.tooltip)
*
* **Note:** Using array to present all the parameters in ECharts
* 2.x is not supported anymore.
*
* The second parameter `ticket` is the asynchronous callback
* flag which should be used along with the third parameter
* `callback` when it is used.
*
* The third parameter `callback` is asynchronous callback.
* When the content of tooltip is acquired asynchronously, `ticket`
* and `htm` as introduced above can be used to update tooltip
* with callback.
*
* Example:
*
* [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-tree.tree.tooltip)
*
*
* @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-tree.tooltip.formatter
*/
formatter?: Function | string;
/**
*
* > **Notice:**series.tooltip only works when
* > [tooltip.trigger](https://ecomfe.github.io/echarts-doc/public/en/option.html#tooltip.trigger)
* > is `'item'`.
*
* The background color of tooltip's floating layer.
*
*
* @default
* "rgba(50,50,50,0.7)"
* @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-tree.tooltip.backgroundColor
*/
backgroundColor?: string;
/**
*
* > **Notice:**series.tooltip only works when
* > [tooltip.trigger](https://ecomfe.github.io/echarts-doc/public/en/option.html#tooltip.trigger)
* > is `'item'`.
*
* The border color of tooltip's floating layer.
*
*
* @default
* '#333'
* @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-tree.tooltip.borderColor
*/
borderColor?: string;
/**
*
* > **Notice:**series.tooltip only works when
* > [tooltip.trigger](https://ecomfe.github.io/echarts-doc/public/en/option.html#tooltip.trigger)
* > is `'item'`.
*
* The border width of tooltip's floating layer.
*
*
* @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-tree.tooltip.borderWidth
*/
borderWidth?: number;
/**
*
* > **Notice:**series.tooltip only works when
* > [tooltip.trigger](https://ecomfe.github.io/echarts-doc/public/en/option.html#tooltip.trigger)
* > is `'item'`.
*
* The floating layer of tooltip space around content.
* The unit is px.
* Default values for each position are 5.
* And they can be set to different values with left, right,
* top, and bottom.
*
* Examples:
*
* [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-tree.tree.tooltip)
*
*
* @default
* 5
* @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-tree.tooltip.padding
*/
padding?: number;
/**
*
* > **Notice:**series.tooltip only works when
* > [tooltip.trigger](https://ecomfe.github.io/echarts-doc/public/en/option.html#tooltip.trigger)
* > is `'item'`.
*
* The text syle of tooltip's floating layer.
*
*
* @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-tree.tooltip.textStyle
*/
textStyle?: {
/**
* text color.
*
*
* @default
* "#fff"
* @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-tree.tooltip.textStyle.color
*/
color?: string;
/**
* font style
*
* Options are:
*
* + `'normal'`
* + `'italic'`
* + `'oblique'`
*
*
* @default
* "normal"
* @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-tree.tooltip.textStyle.fontStyle
*/
fontStyle?: string;
/**
* font thick weight
*
* Options are:
*
* + `'normal'`
* + `'bold'`
* + `'bolder'`
* + `'lighter'`
* + 100 | 200 | 300 | 400...
*
*
* @default
* "normal"
* @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-tree.tooltip.textStyle.fontWeight
*/
fontWeight?: string;
/**
* font family
*
* Can also be 'serif' , 'monospace', ...
*
*
* @default
* "sans-serif"
* @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-tree.tooltip.textStyle.fontFamily
*/
fontFamily?: string;
/**
* font size
*
*
* @default
* 14
* @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-tree.tooltip.textStyle.fontSize
*/
fontSize?: number;
/**
* Line height of the text fregment.
*
* If `lineHeight` is not set in `rich`, `lineHeight` in
* parent level will be used. For example:
*
* [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-tree.tree.tooltip.textStyle)
*
*
* @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-tree.tooltip.textStyle.lineHeight
*/
lineHeight?: number;
/**
* Width of the text block.
* It is the width of the text by default.
* In most cases, there is no need to specify it.
* You may want to use it in some cases like make simple
* table or using background image (see `backgroundColor`).
*
* Notice, `width` and `height` specifies the width and
* height of the content, without `padding`.
*
* `width` can also be percent string, like `'100%'`, which
* represents the percent of `contentWidth` (that is, the
* width without `padding`) of its container box.
* It is based on `contentWidth` because that each text
* fregment is layout based on the `content box`, where
* it makes no sense that calculating width based on `outerWith`
* in prectice.
*
* Notice, `width` and `height` only work when `rich` specified.
*
*
* @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-tree.tooltip.textStyle.width
*/
width?: number | string;
/**
* Height of the text block.
* It is the width of the text by default.
* You may want to use it in some cases like using background
* image (see `backgroundColor`).
*
* Notice, `width` and `height` specifies the width and
* height of the content, without `padding`.
*
* Notice, `width` and `height` only work when `rich` specified.
*
*
* @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-tree.tooltip.textStyle.height
*/
height?: number | string;
/**
* Storke color of the text.
*
*
* @default
* "transparent"
* @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-tree.tooltip.textStyle.textBorderColor
*/
textBorderColor?: string;
/**
* Storke line width of the text.
*
*
* @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-tree.tooltip.textStyle.textBorderWidth
*/
textBorderWidth?: number;
/**
* Shadow color of the text itself.
*
*
* @default
* "transparent"
* @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-tree.tooltip.textStyle.textShadowColor
*/
textShadowColor?: string;
/**
* Shadow blue of the text itself.
*
*
* @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-tree.tooltip.textStyle.textShadowBlur
*/
textShadowBlur?: number;
/**
* Shadow X offset of the text itself.
*
*
* @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-tree.tooltip.textStyle.textShadowOffsetX
*/
textShadowOffsetX?: number;
/**
* Shadow Y offset of the text itself.
*
*
* @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-tree.tooltip.textStyle.textShadowOffsetY
*/
textShadowOffsetY?: number;
};
/**
*
* > **Notice:**series.tooltip only works when
* > [tooltip.trigger](https://ecomfe.github.io/echarts-doc/public/en/option.html#tooltip.trigger)
* > is `'item'`.
*
* Extra CSS style for floating layer.
* The following is an example for adding shadow.
*
* ```
* extraCssText: 'box-shadow: 0 0 3px rgba(0, 0, 0, 0.3);'
*
* ```
*
*
* @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-tree.tooltip.extraCssText
*/
extraCssText?: string;
};
}
namespace SeriesTree {
interface DataObject {
children?: DataObject[];
/**
* The name of the tree node, used to identify each node.
@@ -6498,463 +6959,7 @@ declare namespace echarts {
* @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-tree.data.animationDelayUpdate
*/
animationDelayUpdate?: Function | number;
};
/**
* tooltip settings in this series.
*
*
* @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-tree.tooltip
*/
tooltip?: {
/**
*
* > **Notice:**series.tooltip only works when
* > [tooltip.trigger](https://ecomfe.github.io/echarts-doc/public/en/option.html#tooltip.trigger)
* > is `'item'`.
*
* The position of the tooltip's floating layer, which would
* follow the position of mouse by default.
*
* Options:
*
* + `Array`
*
* Display the position of tooltip's floating layer through
* array, which supports absolute position and relative percentage.
*
* Example:
*
* [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-tree.tree.tooltip)
*
* + `Function`
*
* Callback function in the following form:
*
* [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-tree.tree.tooltip)
*
* **Parameters:**
* point: Mouse position.
* param: The same as formatter.
* dom: The DOM object of tooltip.
* rect: It is valid only when mouse is on graphic elements,
* which stands for a bounding box with `x`, `y`, `width`, and
* `height`.
* size: The size of dom echarts container.
* For example: `{contentSize: [width, height], viewSize: [width,
* height]}`.
*
* **Return:**
* Return value is an array standing for tooltip position, which
* can be absolute pixels, or relative percentage.
* Or can be an object, like `{left: 10, top: 30}`, or `{right:
* '20%', bottom: 40}`.
*
* For example:
*
* [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-tree.tree.tooltip)
*
* Or:
*
* [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-tree.tree.tooltip)
*
* + `'inside'`
*
* Center position of the graphic element where the mouse is
* in, which is only valid when
* [trigger](https://ecomfe.github.io/echarts-doc/public/en/option.html#tooltip.trigger)
* is `'item'`.
*
* + `'top'`
*
* Top position of the graphic element where the mouse is in,
* which is only valid when
* [trigger](https://ecomfe.github.io/echarts-doc/public/en/option.html#tooltip.trigger)
* is `'item'`.
*
* + `'left'`
*
* Left position of the graphic element where the mouse is in,
* which is only valid when
* [trigger](https://ecomfe.github.io/echarts-doc/public/en/option.html#tooltip.trigger)
* is `'item'`.
*
* + `'right'`
*
* Right position of the graphic element where the mouse is
* in, which is only valid when
* [trigger](https://ecomfe.github.io/echarts-doc/public/en/option.html#tooltip.trigger)
* is `'item'`.
*
* + `'bottom'`
*
* Bottom position of the graphic element where the mouse is
* in, which is only valid when
* [trigger](https://ecomfe.github.io/echarts-doc/public/en/option.html#tooltip.trigger)
* is `'item'`.
*
*
* @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-tree.tooltip.position
*/
position?: any[] | string;
/**
*
* > **Notice:**series.tooltip only works when
* > [tooltip.trigger](https://ecomfe.github.io/echarts-doc/public/en/option.html#tooltip.trigger)
* > is `'item'`.
*
* The content formatter of tooltip's floating layer which supports
* string template and callback function.
*
* **1\. String template**
*
* The template variables are `{a}`, `{b}`, `{c}`, `{d}` and
* `{e}`, which stands for series name, data name and data value
* and ect. When
* [trigger](https://ecomfe.github.io/echarts-doc/public/en/option.html#tooltip.trigger)
* is set to be `'axis'`, there may be data from multiple series.
* In this time, series index can be refered as `{a0}`, `{a1}`,
* or `{a2}`.
*
* `{a}`, `{b}`, `{c}`, `{d}` have different meanings for different
* series types:
*
* + Line (area) charts, bar (column) charts, K charts: `{a}`
* for series name, `{b}` for category name, `{c}` for data
* value, `{d}` for none;
*
* + Scatter (bubble) charts: `{a}` for series name, `{b}` for
* data name, `{c}` for data value, `{d}` for none;
*
* + Map: `{a}` for series name, `{b}` for area name, `{c}`
* for merging data, `{d}` for none;
*
* + Pie charts, gauge charts, funnel charts: `{a}` for series
* name, `{b}` for data item name, `{c}` for data value, `{d}`
* for percentage.
*
* **Example:**
*
* ```
* formatter: '{b0}: {c0}<br />{b1}: {c1}'
*
* ```
*
* **2\. Callback function**
*
* The format of callback function:
*
* [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-tree.tree.tooltip)
*
* The first parameter `params` is the data that the formatter
* needs. Its format is shown as follows:
*
* [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-tree.tree.tooltip)
*
* When
* [trigger](https://ecomfe.github.io/echarts-doc/public/en/option.html#tooltip.trigger)
* is `'axis'`, or when tooltip is triggered by
* [axisPointer](https://ecomfe.github.io/echarts-doc/public/en/option.html#xAxis.axisPointer)
* , `params` is the data array of multiple series.
* The content of each item of the array is the same as above.
* Besides,
*
* [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-tree.tree.tooltip)
*
* **Note:** Using array to present all the parameters in ECharts
* 2.x is not supported anymore.
*
* The second parameter `ticket` is the asynchronous callback
* flag which should be used along with the third parameter
* `callback` when it is used.
*
* The third parameter `callback` is asynchronous callback.
* When the content of tooltip is acquired asynchronously, `ticket`
* and `htm` as introduced above can be used to update tooltip
* with callback.
*
* Example:
*
* [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-tree.tree.tooltip)
*
*
* @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-tree.tooltip.formatter
*/
formatter?: Function | string;
/**
*
* > **Notice:**series.tooltip only works when
* > [tooltip.trigger](https://ecomfe.github.io/echarts-doc/public/en/option.html#tooltip.trigger)
* > is `'item'`.
*
* The background color of tooltip's floating layer.
*
*
* @default
* "rgba(50,50,50,0.7)"
* @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-tree.tooltip.backgroundColor
*/
backgroundColor?: string;
/**
*
* > **Notice:**series.tooltip only works when
* > [tooltip.trigger](https://ecomfe.github.io/echarts-doc/public/en/option.html#tooltip.trigger)
* > is `'item'`.
*
* The border color of tooltip's floating layer.
*
*
* @default
* '#333'
* @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-tree.tooltip.borderColor
*/
borderColor?: string;
/**
*
* > **Notice:**series.tooltip only works when
* > [tooltip.trigger](https://ecomfe.github.io/echarts-doc/public/en/option.html#tooltip.trigger)
* > is `'item'`.
*
* The border width of tooltip's floating layer.
*
*
* @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-tree.tooltip.borderWidth
*/
borderWidth?: number;
/**
*
* > **Notice:**series.tooltip only works when
* > [tooltip.trigger](https://ecomfe.github.io/echarts-doc/public/en/option.html#tooltip.trigger)
* > is `'item'`.
*
* The floating layer of tooltip space around content.
* The unit is px.
* Default values for each position are 5.
* And they can be set to different values with left, right,
* top, and bottom.
*
* Examples:
*
* [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-tree.tree.tooltip)
*
*
* @default
* 5
* @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-tree.tooltip.padding
*/
padding?: number;
/**
*
* > **Notice:**series.tooltip only works when
* > [tooltip.trigger](https://ecomfe.github.io/echarts-doc/public/en/option.html#tooltip.trigger)
* > is `'item'`.
*
* The text syle of tooltip's floating layer.
*
*
* @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-tree.tooltip.textStyle
*/
textStyle?: {
/**
* text color.
*
*
* @default
* "#fff"
* @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-tree.tooltip.textStyle.color
*/
color?: string;
/**
* font style
*
* Options are:
*
* + `'normal'`
* + `'italic'`
* + `'oblique'`
*
*
* @default
* "normal"
* @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-tree.tooltip.textStyle.fontStyle
*/
fontStyle?: string;
/**
* font thick weight
*
* Options are:
*
* + `'normal'`
* + `'bold'`
* + `'bolder'`
* + `'lighter'`
* + 100 | 200 | 300 | 400...
*
*
* @default
* "normal"
* @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-tree.tooltip.textStyle.fontWeight
*/
fontWeight?: string;
/**
* font family
*
* Can also be 'serif' , 'monospace', ...
*
*
* @default
* "sans-serif"
* @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-tree.tooltip.textStyle.fontFamily
*/
fontFamily?: string;
/**
* font size
*
*
* @default
* 14
* @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-tree.tooltip.textStyle.fontSize
*/
fontSize?: number;
/**
* Line height of the text fregment.
*
* If `lineHeight` is not set in `rich`, `lineHeight` in
* parent level will be used. For example:
*
* [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-tree.tree.tooltip.textStyle)
*
*
* @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-tree.tooltip.textStyle.lineHeight
*/
lineHeight?: number;
/**
* Width of the text block.
* It is the width of the text by default.
* In most cases, there is no need to specify it.
* You may want to use it in some cases like make simple
* table or using background image (see `backgroundColor`).
*
* Notice, `width` and `height` specifies the width and
* height of the content, without `padding`.
*
* `width` can also be percent string, like `'100%'`, which
* represents the percent of `contentWidth` (that is, the
* width without `padding`) of its container box.
* It is based on `contentWidth` because that each text
* fregment is layout based on the `content box`, where
* it makes no sense that calculating width based on `outerWith`
* in prectice.
*
* Notice, `width` and `height` only work when `rich` specified.
*
*
* @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-tree.tooltip.textStyle.width
*/
width?: number | string;
/**
* Height of the text block.
* It is the width of the text by default.
* You may want to use it in some cases like using background
* image (see `backgroundColor`).
*
* Notice, `width` and `height` specifies the width and
* height of the content, without `padding`.
*
* Notice, `width` and `height` only work when `rich` specified.
*
*
* @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-tree.tooltip.textStyle.height
*/
height?: number | string;
/**
* Storke color of the text.
*
*
* @default
* "transparent"
* @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-tree.tooltip.textStyle.textBorderColor
*/
textBorderColor?: string;
/**
* Storke line width of the text.
*
*
* @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-tree.tooltip.textStyle.textBorderWidth
*/
textBorderWidth?: number;
/**
* Shadow color of the text itself.
*
*
* @default
* "transparent"
* @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-tree.tooltip.textStyle.textShadowColor
*/
textShadowColor?: string;
/**
* Shadow blue of the text itself.
*
*
* @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-tree.tooltip.textStyle.textShadowBlur
*/
textShadowBlur?: number;
/**
* Shadow X offset of the text itself.
*
*
* @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-tree.tooltip.textStyle.textShadowOffsetX
*/
textShadowOffsetX?: number;
/**
* Shadow Y offset of the text itself.
*
*
* @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-tree.tooltip.textStyle.textShadowOffsetY
*/
textShadowOffsetY?: number;
};
/**
*
* > **Notice:**series.tooltip only works when
* > [tooltip.trigger](https://ecomfe.github.io/echarts-doc/public/en/option.html#tooltip.trigger)
* > is `'item'`.
*
* Extra CSS style for floating layer.
* The following is an example for adding shadow.
*
* ```
* extraCssText: 'box-shadow: 0 0 3px rgba(0, 0, 0, 0.3);'
*
* ```
*
*
* @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-tree.tooltip.extraCssText
*/
extraCssText?: string;
};
}
}
}
}
File diff suppressed because it is too large Load Diff