File tree Expand file tree Collapse file tree 2 files changed +22
-18
lines changed Expand file tree Collapse file tree 2 files changed +22
-18
lines changed Original file line number Diff line number Diff line change @@ -178,11 +178,9 @@ dispatchAction({
178
178
179
179
// The following parameters are supported since v5.6.0
180
180
// the id of target legend component
181
- legendId: string ,
181
+ legendId? : string | string [] ,
182
182
// the index of target legend component
183
- legendIndex: number ,
184
- // the name of target legend component
185
- legendName: string
183
+ legendIndex?: number | number []
186
184
})
187
185
```
188
186
@@ -197,23 +195,27 @@ dispatchAction({
197
195
198
196
// The following parameters are supported since v5.6.0
199
197
// the id of target legend component
200
- legendId: string ,
198
+ legendId? : string | string [] ,
201
199
// the index of target legend component
202
- legendIndex: number ,
203
- // the name of target legend component
204
- legendName: string
200
+ legendIndex?: number | number []
205
201
})
206
202
```
207
203
208
204
** EVENT:** [ legendinverseselect] ( ~events.legendinverseselect )
209
205
210
206
### legendScroll(Action)
211
207
Control the scrolling of legend. It works when [ legend.type] ( option.html#legend.type ) is ` 'scroll' ` .
208
+
212
209
``` ts
213
210
dispatchAction ({
214
211
type: ' legendScroll' ,
212
+ // the index of the legend item to scroll to
215
213
scrollDataIndex: number ,
216
- legendId: string
214
+
215
+ // the id of target legend component
216
+ legendId?: string | string [],
217
+ // the index of target legend component
218
+ legendIndex?: number | number []
217
219
})
218
220
```
219
221
Original file line number Diff line number Diff line change @@ -178,11 +178,9 @@ dispatchAction({
178
178
179
179
// 下列参数自 v5.6.0 起开始支持
180
180
// 图例组件ID
181
- legendId: string ,
181
+ legendId? : string | string [] ,
182
182
// 图例组件索引
183
- legendIndex: number ,
184
- // 图例组件名称
185
- legendName: string
183
+ legendIndex?: number | number []
186
184
})
187
185
```
188
186
@@ -197,23 +195,27 @@ dispatchAction({
197
195
198
196
// 下列参数自 v5.6.0 起开始支持
199
197
// 图例组件ID
200
- legendId: string ,
198
+ legendId? : string | string [] ,
201
199
// 图例组件索引
202
- legendIndex: number ,
203
- // 图例组件名称
204
- legendName: string
200
+ legendIndex?: number | number []
205
201
})
206
202
```
207
203
208
204
** EVENT:** [ legendinverseselect] ( ~events.legendinverseselect )
209
205
210
206
### legendScroll(Action)
211
207
控制图例的滚动。当 [ legend.type] ( option.html#legend.type ) 为 ` 'scroll' ` 时有效。
208
+
212
209
``` ts
213
210
dispatchAction ({
214
211
type: ' legendScroll' ,
212
+ // 要滚动到的目标图例项索引
215
213
scrollDataIndex: number ,
216
- legendId: string
214
+
215
+ // 图例组件ID
216
+ legendId?: string | string [],
217
+ // 图例组件索引
218
+ legendIndex?: number | number []
217
219
})
218
220
```
219
221
You can’t perform that action at this time.
0 commit comments