Chart.js icon indicating copy to clipboard operation
Chart.js copied to clipboard

Doughnut Chart size is decreasing automatically when mouse hover

Open WowDarkHole opened this issue 2 years ago • 4 comments

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/

WowDarkHole avatar Nov 29 '22 16:11 WowDarkHole

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

MichaelCropper avatar Dec 01 '22 22:12 MichaelCropper

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

dangreen avatar Dec 14 '22 18:12 dangreen

I suspect it's the same issue as #10951

gbaron avatar Dec 15 '22 01:12 gbaron

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.

igomonteiro avatar Dec 15 '22 10:12 igomonteiro

Please try v4.1.1.

gbaron avatar Dec 17 '22 18:12 gbaron