New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Pie Chart Legend hover behavior inconsistent #20142
Comments
Hi @SuberFu, I'm unable to replicate the hover behavior issue you described. Could you please provide two screenshots showing the issue? One showing the hover effect on the pie chart, and another on the legend. |
I think the problem is the sliced point, Samsung. It behaves differently.
The expectation is that sliced points behave the same as other points when it comes to the inactive state. In non-styled mode it behaves slightly different, but also not as expected: https://jsfiddle.net/highcharts/ba4qh0je/ . The Samsung slice stays fully opaque regardless of whether we are hovering the slices or legends. |
After thorough investigation, it looks like in highcharts/ts/Core/Series/Point.ts Lines 1402 to 1429 in ea0761b
We can change the point's state to What do you think @TorsteinHonsi? |
Tough call @jakubjanuchta ... The demo works perfectly if we remove line 1407 altogether. But that's just luck, because we haven't applied any visual overrides for the I think it is a bug that we can't set I think your proposal of merging the select and inactive states is worth a try. It makes sense that a point can be both selected and inactive. But we must make sure that when the point is unhovered, it reverts back to the select state, not normal. The column series is a good test for that. |
I've got one more thought. Actually, the behavior for the pie series and for the column is exactly the same, see: If we select a column point and we set Now I'm not sure, should we still change this behavior for the pie? |
@jakubjanuchta No, I don't think we should change that behaviour. But there's this think with the inactive state - the column doesn't have inactive states for the other points... |
I agree, thanks!
@TorsteinHonsi |
Expected behaviour
Hover on pie element does the following.
Gray everything out and highlight hovered element.
Same happens to the legend item.
Actual behaviour
Hover on pie element has different behavior than hover on legend element.
Hover on legend element also cause grayout of element entries and the active element doesn't "ungray" out.
Live demo with steps to reproduce
Link
Product version
Highchart 11.2.0
Affected browser(s)
Chrome
The text was updated successfully, but these errors were encountered: