Chartbuilder icon indicating copy to clipboard operation
Chartbuilder copied to clipboard

Number format parsing doesn't work in safari

Open bzigterman opened this issue 9 years ago • 9 comments

For data with 0s or 5s 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:

chartbuilder

bzigterman avatar Aug 03 '14 20:08 bzigterman

Hi Ben,

I can't reproduce this. When I plot your data it charts correctly

screen shot 2014-08-03 at 7 16 41 pm

What browser and operating system are you using? What locale is your operating system set to?

yanofsky avatar Aug 03 '14 23:08 yanofsky

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.

bzigterman avatar Aug 03 '14 23:08 bzigterman

I was able to get it working on Chrome as well, so I have no idea what is going on.

bzigterman avatar Aug 04 '14 01:08 bzigterman

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

yanofsky avatar Aug 04 '14 14:08 yanofsky

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

yanofsky avatar Aug 04 '14 14:08 yanofsky

I am not a developer, so I'm a bit lost, but it still isn't working for me in Safari.

bzigterman avatar Aug 06 '14 03:08 bzigterman

oh sorry I forgot to merge those changes into the hosted version, should be all set now

yanofsky avatar Aug 06 '14 12:08 yanofsky

yeah, it's working. thanks.

bzigterman avatar Aug 06 '14 23:08 bzigterman

leys see it :construction_worker:

unity3diy avatar Nov 28 '14 19:11 unity3diy