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

Doughnut Chart size is decreasing automatically when mouse hover #10925

Closed
WowDarkHole opened this issue Nov 29, 2022 · 5 comments
Closed

Doughnut Chart size is decreasing automatically when mouse hover #10925

WowDarkHole opened this issue Nov 29, 2022 · 5 comments

Comments

@WowDarkHole
Copy link

Expected behavior

Current and expected behavior
I used 2 Doughnut charts in my react app with javascript.
const stamina_data = { datasets: [ { label: "%", data: [5, 30], backgroundColor: ["#f83472", "#4c565d"], borderColor: ["rgba(255, 99, 132, 1)", "rgba(54, 162, 235, 1)"], borderWidth: 0, }, ], };
const power_data = { datasets: [ { label: "boost", data: [40], backgroundColor: ["#f83472"], borderColor: ["rgba(255, 99, 132, 1)"], borderWidth: 0, }, ], };
The issue happened with another developer who checked the chart when the mouse hovered over the chart.
He asked me why the charts go decreased sometimes and I tried.
But It was working on my side and others' side too.
With some problem, I tried zooming in and out of the website.

Current behavior

All other cases are working but at zoom 90%, the issue happened to me too.

Auto decrease happening cases.

  1. Zoom change from 80% to 90%, 100% to 90%.
  2. Mouse hover when zoom is 90%
  3. Any size change events make the chart decrease.

Reproducible sample

https://react-chartjs-2.js.org/examples/doughnut-chart/

Optional extra steps/info to reproduce

No response

Possible solution

No response

Context

No response

chart.js version

^4.0.1

Browser name and version

Windows Chrome, Most updated

Link to your project

https://react-chartjs-2.js.org/examples/doughnut-chart/

@MichaelCropper
Copy link

I'm having the same issue. Seems like someone at core has dropped the ball.... Awaiting fix.

@dangreen
Copy link
Collaborator

@WowDarkHole @MichaelCropper Hi. Could you please record a video with this issue?

@gbaron
Copy link
Contributor

gbaron commented Dec 15, 2022

I suspect it's the same issue as #10951

@igomonteiro
Copy link

igomonteiro commented Dec 15, 2022

I suspect it's the same issue as #10951

yes @gbaron, I opened this issue, but the difference was that in my browser it happened using 100% zoom, but in the day after I opened the issue, I tried to reproduce the bug again and nothing happened, then I tried the 90% zoom and the issue appeared again.

@gbaron
Copy link
Contributor

gbaron commented Dec 17, 2022

Please try v4.1.1.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

6 participants