plainheart commented on issue #21025:
URL: https://github.com/apache/echarts/issues/21025#issuecomment-2960904268
Like `***Id`/`***Name`/`***Index` in other components,
`legendId`/`legendName`/`legendIndex` is used to explicitly specify the target
legend component when there are **_multiple_** legend components.
`legendId`/`legendName`/`legendIndex` is not equal to
`seriesId`/`seriesName`/`seriesIndex`.
The right usage should be like this:
```js
myChart.dispatchAction({
type: 'legendToggleSelect',
name: 'Legend A', // <-- this is the name of a legend item or a series
legendName: 'legendComponentNameA', // <-- this is the name of a whole
legend component ( NOT EQUAL TO the above 'name')
legendIndex: 'legendComponentIndexA', // <-- this is the index of a whole
legend component,
legendId: 'legendComponentIdA', // <-- this is the id of a whole legend
component,
});
```
You can also see #20129 for the context.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]