chartjs / Chart.js

Simple HTML5 Charts using the <canvas> tag
https://www.chartjs.org/
MIT License
63.9k stars 11.88k forks source link

Adding configuration to `y` scale produces point shift in scatter type dataset #11786

Open eusonlito opened 1 month ago

eusonlito commented 1 month ago

Expected behavior

Dot position in scatter type dataset should be always at same place.

Current behavior

After adding { scales: { y: {} } } to options, the point related to the scatter data set is moved from its correct position.

Without y scale defined:

Screenshot from 2024-05-22 12-53-08

With y scale defined:

Screenshot from 2024-05-22 12-52-47

Reproducible sample

https://codepen.io/eusonlito/pen/xxNwZPN

Optional extra steps/info to reproduce

No response

Possible solution

No response

Context

I'm trying to remove the y scale to scatter type, but after added { scales: { y: { display: false } } } to options the dot is displaced.

chart.js version

v4.4.3

Browser name and version

Google Chrome Version 126.0.6478.7 (Official Build) beta (64-bit)

Link to your project

https://github.com/eusonlito/crypto