Skip to content
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

fix: restore hover effect on pie charts when using Lumo theme classes #6850

Merged
merged 2 commits into from
Nov 26, 2024

Conversation

sissbruecker
Copy link
Contributor

Comment on lines -167 to -170

States states = new States();
states.setHover(new Hover(false));
getPlotOptions().getPie().setStates(states);
Copy link
Contributor Author

@sissbruecker sissbruecker Nov 22, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This was added initially with vaadin/vaadin-charts-flow#393. From the Hover JavaDoc I can not quite understand what the enabled state is supposed to do, but apparently disabling it doesn't do anything sensible as it then marks all chart slices as inactive on hover. Removing this configuration seems to make the chart behave like any other without a theme.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

And this was there since Charts for FW 7(? maybe).

From what I understand from the hover configuration, disabling it would still allow to hover the legend items and see the correspondent slice in the chart highlighted. But, by default, the legends in a pie chart show in the pie itself, so it should require some extra configuration to show the legend in a separate box, which is not expected.

This is how it would look like (you can check here):

pie-chart.mp4

@sissbruecker sissbruecker marked this pull request as ready for review November 22, 2024 07:52
Copy link
Contributor

@DiegoCardoso DiegoCardoso left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@sissbruecker sissbruecker enabled auto-merge (squash) November 26, 2024 07:04
@sissbruecker sissbruecker merged commit 8b1656c into main Nov 26, 2024
5 checks passed
@sissbruecker sissbruecker deleted the fix/lumo-pie-chart-hover branch November 26, 2024 07:15
sissbruecker added a commit that referenced this pull request Nov 26, 2024
…#6850) (#6866)

Co-authored-by: Sascha Ißbrücker <sissbruecker@vaadin.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[vaadin-charts] Hover State Issue on Pie Chart with Lumo Theme
3 participants