chartjs / chartjs/Chart.js

Doughnut Chart size is decreasing automatically when mouse hover or click

Open
#11,304 2 comments 0 reactions 0 assignees View on GitHub
type: bug
Dominant language
JavaScript
Stars
67.7k
Forks
11.9k
Avg merge
7h 39m
Merged PRs (30d)
5

Description

### Expected behavior

![image](https://github.com/chartjs/Chart.js/assets/117346640/63d7204c-f998-4168-bf95-6f26b459d639)

### Current behavior

![image](https://github.com/chartjs/Chart.js/assets/117346640/0c1d575a-a91d-4e44-a62e-f3505d4695e6)

### Optional extra steps/info to reproduce

_No response_

### Possible solution

I suspect it's because devicePixelRatio, but if I set it to 1 the canvas quality is worse

### Context

my chart options in Vue.js 2
`options: {
layout: {
padding: 40,
},
responsive: false,
maintainAspectRatio: false,
animation: {
animateScale: true,
},
plugins: {
legend: {
display: this.isLegend,
},
tooltip: {
enabled: this.chartType === 'single',
},
},
},`

### chart.js version

v4.2.1

### Browser name and version

Mozilla Firefox

### Link to your project

_No response_

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.