You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@echarts.apache.org by "echarts-bot[bot] (via GitHub)" <gi...@apache.org> on 2023/03/07 13:46:18 UTC
[GitHub] [echarts] echarts-bot[bot] commented on issue #18343: [Feature] 是否支持不同series的不同dataIndex高亮?
echarts-bot[bot] commented on issue #18343:
URL: https://github.com/apache/echarts/issues/18343#issuecomment-1458202048
@sz-p It seems you are not using English, I've helped translate the content automatically. To make your issue understood by more people and get helped, we'd like to suggest using English next time. 🤗
<details><summary><b>TRANSLATED</b></summary><br>
**TITLE**
[Feature] Does it support different dataIndex highlighting for different series?
**BODY**
### What problem does this feature solve?
In the following scenarios, `dataindex 0` of `series 0` and `dataindex 0, 1` of `series 1` need to be highlighted
original:

Highlight:

code:
```js
const hightLight = (e) => {
const name = e.name;
if (e.isFired) return;
const series0DataIndex = [];
const series1DataIndex = [];
for (let i = 0; i < levelOData. length; i++) {
if (levelOData[i].name === name) {
series0DataIndex.push(i);
}
}
for (let i = 0; i < level1Data.length; i++) {
if (level1Data[i].name === name) {
series1DataIndex. push(i);
}
}
console.log(series1DataIndex);
console.log(series0DataIndex);
myChart. dispatchAction({
type: 'highlight',
seriesIndex: [0, 1],
isFired: true,
// Expectation here to distinguish according to different series
dataIndex: [series1DataIndex, series0DataIndex],
});
};
myChart.on('highlight', hightLight);
```
Is there an alternative if not supported?
### What does the proposed API look like?
nothing
</details>
--
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: commits-unsubscribe@echarts.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@echarts.apache.org
For additional commands, e-mail: commits-help@echarts.apache.org