What problem does this feature solve?
Mainly, in stacked bars, sometimes is useful to have the emphasis on the whole category, not on the series.
I'll try to explain with some screenshots:
If we see the example on the docs of a stacked bar (this one https://echarts.apache.org/examples/en/editor.html?c=bar-y-category-stack ) when we do hover on some value, the emphasis could be 'none', 'self' and 'series'. None is self-explanatory, 'self' raises some weird behavior that, honestly, I don't understand:
And 'series' emphasis on the whole series:
But is sometimes useful to have the emphasis just on the category, specially when the label shows info about the category, not about the series, something like this (I made it with paint):
What does the proposed API look like?
Add 'category' on the series-bar.emphasis.focus
with the expected behavior.
Anyway, if there is a workaround to get this, I want to know! I've tried with events but without result.
Also, I think it would be a good idea to have also the event 'blur' to allow having this behavior programmatically.
Thanks in advance!
2条答案
按热度按时间qcuzuvrc1#
I think the
'self'
is a bug. And it seems to be a useful feature to focus the category. Are you interested in making a pull request? Please checkout the wiki to learn more.yebdmbv42#
Yes of course! I'll try to implement this feature in the next days.