Skip to content

Commit 0cfc08f

Browse files
committed
fix(legend): remove legendId/legendIndex/legendName parameters from legendSelect/legendUnSelect/legendToggleSelect actions (resolves apache/echarts#21025)
1 parent 2033251 commit 0cfc08f

File tree

2 files changed

+9
-54
lines changed

2 files changed

+9
-54
lines changed

en/api/action.md

Lines changed: 3 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -138,15 +138,7 @@ Selects legend.
138138
dispatchAction({
139139
type: 'legendSelect',
140140
// legend name
141-
name: string,
142-
143-
// The following parameters are supported since v5.6.0
144-
// the id of target legend component
145-
legendId: string,
146-
// the index of target legend component
147-
legendIndex: number,
148-
// the name of target legend component
149-
legendName: string
141+
name: string
150142
})
151143
```
152144

@@ -159,15 +151,7 @@ Unselects the legend.
159151
dispatchAction({
160152
type: 'legendUnSelect',
161153
// legend name
162-
name: string,
163-
164-
// The following parameters are supported since v5.6.0
165-
// the id of target legend component
166-
legendId: string,
167-
// the index of target legend component
168-
legendIndex: number,
169-
// the name of target legend component
170-
legendName: string
154+
name: string
171155
})
172156
```
173157

@@ -179,15 +163,7 @@ Toggles legend selecting state.
179163
dispatchAction({
180164
type: 'legendToggleSelect',
181165
// legend name
182-
name: string,
183-
184-
// The following parameters are supported since v5.6.0
185-
// the id of target legend component
186-
legendId: string,
187-
// the index of target legend component
188-
legendIndex: number,
189-
// the name of target legend component
190-
legendName: string
166+
name: string
191167
})
192168
```
193169

zh/api/action.md

Lines changed: 6 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -137,15 +137,7 @@ dispatchAction({
137137
dispatchAction({
138138
type: 'legendSelect',
139139
// 图例名称
140-
name: string,
141-
142-
// 下列参数自 v5.6.0 起开始支持
143-
// 图例组件ID
144-
legendId: string,
145-
// 图例组件索引
146-
legendIndex: number,
147-
// 图例组件名称
148-
legendName: string
140+
name: string
149141
})
150142
```
151143

@@ -158,42 +150,28 @@ dispatchAction({
158150
dispatchAction({
159151
type: 'legendUnSelect',
160152
// 图例名称
161-
name: string,
162-
163-
// 下列参数自 v5.6.0 起开始支持
164-
// 图例组件ID
165-
legendId: string,
166-
// 图例组件索引
167-
legendIndex: number,
168-
// 图例组件名称
169-
legendName: string
153+
name: string
170154
})
171155
```
172156

173157
**EVENT:** [legendunselected](~events.legendunselected)
174158

175159
### legendToggleSelect(Action)
176160
切换图例的选中状态。
161+
177162
```ts
178163
dispatchAction({
179164
type: 'legendToggleSelect',
180165
// 图例名称
181-
name: string,
182-
183-
// 下列参数自 v5.6.0 起开始支持
184-
// 图例组件ID
185-
legendId: string,
186-
// 图例组件索引
187-
legendIndex: number,
188-
// 图例组件名称
189-
legendName: string
166+
name: string
190167
})
191168
```
192169

193170
**EVENT:** [legendselectchanged](~events.legendselectchanged)
194171

195172
### legendAllSelect(Action)
196173
将图例全选。
174+
197175
```ts
198176
dispatchAction({
199177
type: 'legendAllSelect',
@@ -212,6 +190,7 @@ dispatchAction({
212190

213191
### legendInverseSelect(Action)
214192
将图例反选。
193+
215194
```ts
216195
dispatchAction({
217196
type: 'legendInverseSelect',

0 commit comments

Comments
 (0)