reactchartjs / react-chartjs-2

React components for Chart.js, the most popular charting library
https://react-chartjs-2.js.org
MIT License
6.58k stars 2.37k forks source link

[Bug]: The canvas created in headless mode looks distorted #1204

Open llittlefoxx opened 10 months ago

llittlefoxx commented 10 months ago

Would you like to work on a fix?

Current and expected behavior

Current behavior: The canvas generated by the library works as it's supposed to in the normal browser. image

However, in the headless mode of the browser triggered by the E2E tests, a screenshot of the canvas shows that its distorted. image

Expected behavior: The canvas is rendered in headless mode similarly to the normal browser mode

Reproduction

Create a canvas, take a screenshot of it with cypress in an E2E test while running it in headless mode with the browser of your choice

chart.js version

3.5.0

react-chartjs-2 version

4.3.1

Possible solution

No response