Tuesday 17 January 2012

jqPlot, IE7, dateAxisRendering and "Object doesn't support property or method 'getTime'"

I am using the excellent graphing library jqPlot and as most people (I expect) I develop in Chrome but unfortunately have to deploy to IE. IE7 of all things. Anyway, jqPlot allows you to specify your axis as textual dates and interprets them, and handles them correctly (i.e. spacing and showing a sane number of ticks). The problem is that in Chrome the X label can be "2011-Dec-1" but in IE (7 and 9) that generates "Object doesn't support property or method 'getTime'". Changing the text to '2011-12-01' works and it seems to be hard coded to be year, month and day so localisation issues aren't a concern....

2 comments:

  1. Hi.

    Did you find a solution for this stuff?.

    This line brakes my charts..

    Thanks

    ReplyDelete
  2. A little late but maybe this will help, confirm that your date formatting matches the formatString type EXACTLY. For instance, should you use formatString: '%F' confirm that absolutely no date value deviates from the 'xxxx-xx-xx' format.

    Hope that helps!

    Allen W.

    ReplyDelete