-
Notifications
You must be signed in to change notification settings - Fork 11.9k
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
[BUG] Incorrect handling of decimals in non-English locale #5680
Comments
I think the issue with this is that the data is given to the chart as strings that are locally formatted. I don't have a Polish locale to test, but I did try this:
My hunch is that the strings are formatted as |
Hey there, thanks for looking at this @etimberg The data isn't represented as strings, but as numbers, e.g.:
The representation of this cannot be at fault - since the data is rendered server-side into the DOM on page load (https://gist.github.com/Noxville/9e9c698148befebc8960abcff5d1094e if you're interested to see, but basically just specific number-formatted). |
@Noxville can you reproduce with a newer version of Chart.js? 2.1 is pretty old |
Hey there @benmccann - took a bit of time to get back to you. I have bumped the version up (2.9.3) and asked some of the affected users to test to see if it fixed anything. I also installed one of the affected languages (Polish) on my PC, and I don't have the issue. Still an okay example page for the bug: https://datdota.com/ratings/top?type=elo64 Here are some of the example machines tested on: #1 #2 #3 ... |
Hmm. It's strange that you can't reproduce when changing your locale to Polish. I'm not sure what we can do without a reproducible test case... Your _datasets.gsp uses |
And to add bit more data, I'm on windows 10, using english (us) in both windows and browser. regional settings are finnish. Brave works ok, but for Chrome the decimal separator is wrong. So I guess your site is determining this automatically? |
Hey, this is a bit baffling for me - I assumed that (primarily due to effective caching) the server-side rendered html would be unchanged no matter the locale. Was difficult for me reproduce, but clearly I was wrong. Thanks for the help everyone! |
Hey there, I've got a report from some users of a site I run that there are weirdly distorted/broken/incorrect series drawn in a simple line graph. I am unable to reproduce the bug myself, but I believe it's related/based on lang/locale since the people with the issue are all Polish.
My guess is that there's some bug that's interpreting decimal separators incorrectly; so I'm hoping this is a well-known problem with some trivial fix.
Bug behaviour: https://pbs.twimg.com/media/DkVoHqqX0AIzewF.jpg:large
Expected behaviour: http://datdota.com/ratings/top?type=glicko2
The text was updated successfully, but these errors were encountered: