Chartbuilder
Chartbuilder copied to clipboard
Number format parsing doesn't work in safari
For data with 0
s or 5
s in it, Chartbuilder graphs the wrong data. It graphs it as if the 0
or 5
doesn't exist.
This:
date employees
2001 284
2002 682
2003 1628
2004 3021
2005 5680
Results in this:
Hi Ben,
I can't reproduce this. When I plot your data it charts correctly
What browser and operating system are you using? What locale is your operating system set to?
Safari 7.0.5 on Mac OS 10.9.4. Region is set to United States.
I just tried it with all my extensions off, and it still didn't work.
I was able to get it working on Chrome as well, so I have no idea what is going on.
This is a problem with the way chartbuilder determines number formats here https://github.com/Quartz/Chartbuilder/blob/master/js/chartbuilder.js#L712-L716
toLocaleString
in Safari returns the same as toString()
and thus screws up everything
I pushed in a change that if the locale separators can't be determined use .
and ,
...which is bad, but not as bad a charting wrong data
I am not a developer, so I'm a bit lost, but it still isn't working for me in Safari.
oh sorry I forgot to merge those changes into the hosted version, should be all set now
yeah, it's working. thanks.
leys see it :construction_worker: