From 9fcedc21897169216407981d1961856637aef162 Mon Sep 17 00:00:00 2001 From: Mark Brough Date: Sat, 23 Feb 2013 16:07:42 +0000 Subject: [PATCH] Date bug corrected, fixes #327 --- src/view.flot.js | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/src/view.flot.js b/src/view.flot.js index 70493ff7..20d9c374 100644 --- a/src/view.flot.js +++ b/src/view.flot.js @@ -191,8 +191,8 @@ my.Flot = Backbone.View.extend({ if (typeof label !== 'string') { label = label.toString(); } - if (self.state.attributes.graphType !== 'bars' && label.length > 8) { - label = label.slice(0, 5) + "..."; + if (self.state.attributes.graphType !== 'bars' && label.length > 10) { + label = label.slice(0, 10) + "..."; } return label; @@ -322,12 +322,7 @@ my.Flot = Backbone.View.extend({ var isDateTime = (xtype === 'date' || xtype === 'date-time' || xtype === 'time'); if (isDateTime) { - if (self.state.attributes.graphType != 'bars' && - self.state.attributes.graphType != 'columns') { - x = new Date(x).getTime(); - } else { - x = index; - } + x = index; } else if (typeof x === 'string') { x = parseFloat(x); if (isNaN(x)) {