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

floating point on y axis #11751

Open
netmanindy opened this issue Apr 22, 2024 · 8 comments
Open

floating point on y axis #11751

netmanindy opened this issue Apr 22, 2024 · 8 comments

Comments

@netmanindy
Copy link

Expected behavior

I'm trying to chart Barometric pressure with chart.js version 4.4.2
data: [990.25,1013.25,1013.25,1013.25,1013.25,1040.25,1013.25,1013.25,1013.25,1013.25,1013.25,1013.25,1013.25,1013.25,1013.25,1013.25,1013.25,1013.25,1013.25,1013.25,1013.25,1013.25,1013.25,1013.25,1013.25,1013.25,1013.25,1013.25,1030.25,1013.25,1013.25,1013.25,1013.25,1013.25,1013.25,1013.25,1013.25,1013.25,1013.25,1013.25,1013.25,1000.25,1013.25,1013.25,1013.25,1013.25,1013.25,1013.25],

Current behavior

with chart.js version 4.4.2 the y axis displays with commas, like 1,024, 1,025, etc...this is completely unusable..
with older version of chart.js version 2.9.4...floating point numbers are displayed properly.. 1024.1, 1025.9, etc

Reproducible sample

https://cdn.jsdelivr.net/npm/chart.js@4.4.2/dist/chart.umd.min.js

Optional extra steps/info to reproduce

Anyway, Love chart.js 2.9.4 ...trying up update to 4.4.2

Possible solution

No response

Context

No response

chart.js version

4.4.2

Browser name and version

latest mozilla firefox on ubuntu linux

Link to your project

http://netmanindy.com:7608/

@LeeLenaleee
Copy link
Collaborator

You can use the locale options to format the ticks in the locale format you desire. Otherwise you can also use the tick callback to apply a custom format to them

@darshit1920
Copy link

darshit1920 commented Apr 26, 2024

Hey
I am not able to reproduce it.
Kindly write in detail about to start the server

@netmanindy
Copy link
Author

@netmanindy
Copy link
Author

Thank You

@netmanindy
Copy link
Author

Screenshot from 2024-05-01 19-15-56

@netmanindy
Copy link
Author

The .png was rendered using chart.js 2.9.4, its displays floating point numbers correctly ..4.4.2 does not. It inserts a comma.. This is not usable...

@netmanindy
Copy link
Author

Screenshot from 2024-05-01 19-27-51_chart js_4 4 2

@netmanindy
Copy link
Author

Chart 4.4.2 does not render floating point numbers properly .

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

3 participants