Open andbjer opened 1 year ago
Hi, I didn't quite understand. What do you mean by "Item remains highlighted even though it is not displayed in the chart anymore."?
Sorry, should have phrased it differently. What I mean is that the chart still goes into a "highlighting" state when hovering over an item in the legend that has been deselected, but it doesn't highlight anything really. When I hover over a deselected element, I would expect that it doesn't apply the highlighting at all, and thus not fade out the other data.
In the attached picture I hover over "Direct", which is not visible in the chart but the other data is still faded out.
The "faded out" effect is called downplay.
Just remove focus from emphasis, or replace it with more pronounced highlighting like itemStyle: {opacity: 0.7}
I already have a workaround for this but it feels like a bug to me. Why downplay the other series when hovering over a series which is not visible in the plot and that won't be highlighted? The default behaviour in this case should be to not downplay the other series in my opinion.
Version
5.4.1
Link to Minimal Reproduction
https://codesandbox.io/s/stacked-horizontal-bar-forked-rvgk66?file=/index.html
Steps to Reproduce
emphasis
Current Behavior
Items that are deselected and not displayed in the plot are still highlighted if the series was configured with
emphasis
Expected Behavior
I would expect no highlighting when hovering over deselected items in the legend.
Environment
Any additional comments?
No response