montera34 / pageonex

PageOneX. Analyzing front pages
http://pageonex.com
GNU Affero General Public License v3.0
54 stars 13 forks source link

Labels in X axis in bar chart (dates) are not being displayed, they show up as NaN/NaN #157

Closed numeroteca closed 11 years ago

numeroteca commented 11 years ago

This is happening in Firefox running in Ubuntu, I also saw the same behavior in Safari with an iPad. screenshot from 2013-06-07 13 34 54

In chrome, in ubuntu, it was working well.

elplatt commented 11 years ago

I would check two things. First, make sure that the datavis.js formatDate() function works when given a string like '2013-06-20'. Then, make sure that arrays have a map() function:

[1, 2, 3].map(function (elt) { return elt + 1; }); // Should return [2, 3, 4]

elplatt commented 11 years ago

This was a problem with firefox's implementation of javascript Date objects. Switching from creating with a date string to creating with year, month, day seems to fix it.