echarts
echarts copied to clipboard
[Feature] Could I emphasis child without emphasizing its parent in returnItem of series-custom?
What problem does this feature solve?
- I just want to emphasis a text only in a bunch of rect group.
- And I also want to bind some event listener to the different child node.
How can I do this? Thanks!!!
This is a PR maybe related to this feature.
https://github.com/apache/echarts/pull/12775
What does the proposed API look like?
renderItem(params, api) {
return {
type: 'group',
children: [{
type: 'rect',
textContent: {
// type: 'text' can be ignored
style: {
text: 'xxxx',
fill: 'red'
},
emphasis: { // this rect emphasis
style: {
...
}
}
}
}, {
type: 'rect',
textContent: {
// type: 'text' can be ignored
style: {
text: 'xxxx',
fill: 'red'
},
// emphasis: { // this rect NOT emphasis
// style: {
// ...
// }
// }
}
}]
}
}