doc: add geo highlight downplay and select
diff --git a/en/api/action.md b/en/api/action.md
index d7ef7e3..2089381 100644
--- a/en/api/action.md
+++ b/en/api/action.md
@@ -1,12 +1,24 @@
-{{ target: action-series-query }}// optional; series index; could be an array of multiple series
- seriesIndex?: number|Array,
- // optional; series name; could be an array of multiple series
- seriesName?: string|Array,{{/target}}
+{{ target: action-series-query }}// Find ${componentType} by index or id or name.
+ // Can be an array to find multiple components.
+ seriesIndex?: number | number[],
+ seriesId?: string | string[],
+ seriesName?: string | string[],{{/target}}
{{ target: action-data-query }}// data index; could assign by name attribute when not defined
- dataIndex?: number,
+ dataIndex?: number | number[],
// optional; data name; ignored when dataIndex is defined
- name?: string{{/target}}
+ name?: string | string[],{{/target}}
+
+{{ target: action-component-query }}// Find ${componentType} by index or id or name.
+ // Can be an array to find multiple components.
+ ${componentType}Index?: number | number[],
+ ${componentType}Id?: string | string[],
+ ${componentType}Name?: string | string[],{{/target}}
+
+{{ target: action-component-item-query }}// ${componentItemDesc} in ${componentType} component.
+ // Can be an array to specify multiple names.
+ name?: string | string[],{{/target}}
+
{{ target: action }}
@@ -18,34 +30,51 @@
## highlight(Action)
-Highlights specified data.
+Highlights specified data graphics.
-Series is specified through `seriesName` or `seriesIndex`. If another data needs to be specified, then use `dataIndex` or `name`.
```js
+// If highlight series:
dispatchAction({
type: 'highlight',
+
{{ use: action-series-query }}
- // options are index of data
- dataIndex?: number,
- // options are data name
- name?: string
-})
+
+ {{ use: action-data-query }}
+});
+
+// If highlight geo component:
+dispatchAction({
+ type: 'highlight',
+
+ {{ use: action-component-query(componentType = 'geo') }}
+
+ {{ use: action-component-item-query(componentType = 'geo', componentItemDesc = 'region') }}
+});
```
+
## downplay(Action)
-Downplay specified data.
+Downplay specified data graphics.
-Series is specified through `seriesName` or `seriesIndex`. If another data needs to be specified, then use `dataIndex` or `name`.
```js
+// If downplay series:
dispatchAction({
type: 'downplay',
+
{{ use: action-series-query }}
- // options are index of data
- dataIndex?: number,
- // options are data name
- name?: string
-})
+
+ {{ use: action-data-query }}
+});
+
+// If downplay geo component:
+dispatchAction({
+ type: 'downplay',
+
+ {{ use: action-component-query(componentType = 'geo') }}
+
+ {{ use: action-component-item-query(componentType = 'geo', componentItemDesc = 'region') }}
+});
```
## select(Action)
@@ -55,8 +84,9 @@
```js
dispatchAction({
type: 'select',
- // 图例名称
+
{{ use: action-series-query }}
+
{{ use: action-data-query }}
})
```
@@ -68,8 +98,9 @@
```js
dispatchAction({
type: 'unselect',
- // 图例名称
+
{{ use: action-series-query }}
+
{{ use: action-data-query }}
})
```
@@ -81,8 +112,9 @@
```js
dispatchAction({
type: 'toggleSelected',
- // 图例名称
+
{{ use: action-series-query }}
+
{{ use: action-data-query }}
})
```
@@ -449,8 +481,10 @@
```js
dispatchAction({
type: '${componentType}Select',
- {{ use: action-series-query }}
- {{ use: action-data-query }}
+
+ {{ use: action-component-query(componentType = 'geo') }}
+
+ {{ use: action-component-item-query(componentType = 'geo', componentItemDesc = 'region') }}
})
```
@@ -462,8 +496,10 @@
```js
dispatchAction({
type: '${componentType}UnSelect',
- {{ use: action-series-query }}
- {{ use: action-data-query }}
+
+ {{ use: action-component-query(componentType = 'geo') }}
+
+ {{ use: action-component-item-query(componentType = 'geo', componentItemDesc = 'region') }}
})
```
**EVENT:** [${componentType}unselected](~events.${componentType}unselected)
@@ -474,8 +510,10 @@
```js
dispatchAction({
type: '${componentType}ToggleSelect',
- {{ use: action-series-query }}
- {{ use: action-data-query }}
+
+ {{ use: action-component-query(componentType = 'geo') }}
+
+ {{ use: action-component-item-query(componentType = 'geo', componentItemDesc = 'region') }}
})
```
**EVENT:** [${componentType}selectchanged](~events.${componentType}selectchanged)
diff --git a/zh/api/action.md b/zh/api/action.md
index 4f1d58b..affc030 100644
--- a/zh/api/action.md
+++ b/zh/api/action.md
@@ -1,12 +1,22 @@
-{{ target: action-series-query }}// 可选,系列 index,可以是一个数组指定多个系列
- seriesIndex?: number|Array,
- // 可选,系列名称,可以是一个数组指定多个系列
- seriesName?: string|Array,{{/target}}
+{{ target: action-series-query }}// 用 index 或 id 或 name 来指定系列。
+ // 可以使用数组指定多个系列。
+ seriesIndex?: number | number[],
+ seriesId?: string | string[],
+ seriesName?: string | string[],{{/target}}
-{{ target: action-data-query }}// 数据的 index,如果不指定也可以通过 name 属性根据名称指定数据
- dataIndex?: number,
- // 可选,数据名称,在有 dataIndex 的时候忽略
- name?: string{{/target}}
+{{ target: action-data-query }}// 数据项的 index,如果不指定也可以通过 name 属性根据名称指定数据项
+ dataIndex?: number | number[],
+ // 可选,数据项名称,在有 dataIndex 的时候忽略
+ name?: string | string[],{{/target}}
+
+{{ target: action-component-query }}// 用 index 或 id 或 name 来指定 ${componentType} 组件。
+ // 可以用数组指定多个 ${componentType} 组件。
+ ${componentType}Index?: number | number[],
+ ${componentType}Id?: string | string[],
+ ${componentType}Name?: string | string[],{{/target}}
+
+{{ target: action-component-item-query }}// ${componentType} 组件中 ${componentItemDesc} 名称。可以是一个数组指定多个名称。
+ name?: string | string[],{{/target}}
{{ target: action }}
@@ -20,32 +30,48 @@
高亮指定的数据图形。
-通过`seriesName`或者`seriesIndex`指定系列。如果要再指定某个数据可以再指定`dataIndex`或者`name`。
```js
+// 如果要高亮系列:
dispatchAction({
type: 'highlight',
+
{{ use: action-series-query }}
- // 可选,数据的 index
- dataIndex?: number,
- // 可选,数据的 名称
- name?: string
-})
+
+ {{ use: action-data-query }}
+});
+
+// 如果要高亮 geo 组件:
+dispatchAction({
+ type: 'highlight',
+
+ {{ use: action-component-query(componentType = 'geo') }}
+
+ {{ use: action-component-item-query(componentType = 'geo', componentItemDesc = 'region') }}
+});
```
## downplay(Action)
取消高亮指定的数据图形。
-通过`seriesName`或者`seriesIndex`指定系列。如果要指定某个数据可以再指定`dataIndex`或者`name`。
```js
+// 如果要取消高亮系列:
dispatchAction({
type: 'downplay',
+
{{ use: action-series-query }}
- // 可选,数据的 index
- dataIndex?: number,
- // 可选,数据的 名称
- name?: string
+
+ {{ use: action-data-query }}
})
+
+// 如果要取消高亮 geo 组件:
+dispatchAction({
+ type: 'downplay',
+
+ {{ use: action-component-query(componentType = 'geo') }}
+
+ {{ use: action-component-item-query(componentType = 'geo', componentItemDesc = 'region') }}
+});
```
## select(Action)
@@ -55,8 +81,9 @@
```js
dispatchAction({
type: 'select',
- // 图例名称
+
{{ use: action-series-query }}
+
{{ use: action-data-query }}
})
```
@@ -68,8 +95,9 @@
```js
dispatchAction({
type: 'unselect',
- // 图例名称
+
{{ use: action-series-query }}
+
{{ use: action-data-query }}
})
```
@@ -81,8 +109,9 @@
```js
dispatchAction({
type: 'toggleSelected',
- // 图例名称
+
{{ use: action-series-query }}
+
{{ use: action-data-query }}
})
```
@@ -434,8 +463,10 @@
```js
dispatchAction({
type: '${componentType}Select',
- {{ use: action-series-query }}
- {{ use: action-data-query }}
+
+ {{ use: action-component-query(componentType = 'geo') }}
+
+ {{ use: action-component-item-query(componentType = 'geo', componentItemDesc = 'region') }}
})
```
@@ -447,8 +478,10 @@
```js
dispatchAction({
type: '${componentType}UnSelect',
- {{ use: action-series-query }}
- {{ use: action-data-query }}
+
+ {{ use: action-component-query(componentType = 'geo') }}
+
+ {{ use: action-component-item-query(componentType = 'geo', componentItemDesc = 'region') }}
})
```
**EVENT:** [${componentType}unselected](~events.${componentType}unselected)
@@ -459,8 +492,10 @@
```js
dispatchAction({
type: '${componentType}ToggleSelect',
- {{ use: action-series-query }}
- {{ use: action-data-query }}
+
+ {{ use: action-component-query(componentType = 'geo') }}
+
+ {{ use: action-component-item-query(componentType = 'geo', componentItemDesc = 'region') }}
})
```
**EVENT:** [${componentType}selectchanged](~events.${componentType}selectchanged)