Date bug corrected, fixes #327
This commit is contained in:
@@ -191,8 +191,8 @@ my.Flot = Backbone.View.extend({
|
|||||||
if (typeof label !== 'string') {
|
if (typeof label !== 'string') {
|
||||||
label = label.toString();
|
label = label.toString();
|
||||||
}
|
}
|
||||||
if (self.state.attributes.graphType !== 'bars' && label.length > 8) {
|
if (self.state.attributes.graphType !== 'bars' && label.length > 10) {
|
||||||
label = label.slice(0, 5) + "...";
|
label = label.slice(0, 10) + "...";
|
||||||
}
|
}
|
||||||
|
|
||||||
return label;
|
return label;
|
||||||
@@ -322,12 +322,7 @@ my.Flot = Backbone.View.extend({
|
|||||||
var isDateTime = (xtype === 'date' || xtype === 'date-time' || xtype === 'time');
|
var isDateTime = (xtype === 'date' || xtype === 'date-time' || xtype === 'time');
|
||||||
|
|
||||||
if (isDateTime) {
|
if (isDateTime) {
|
||||||
if (self.state.attributes.graphType != 'bars' &&
|
x = index;
|
||||||
self.state.attributes.graphType != 'columns') {
|
|
||||||
x = new Date(x).getTime();
|
|
||||||
} else {
|
|
||||||
x = index;
|
|
||||||
}
|
|
||||||
} else if (typeof x === 'string') {
|
} else if (typeof x === 'string') {
|
||||||
x = parseFloat(x);
|
x = parseFloat(x);
|
||||||
if (isNaN(x)) {
|
if (isNaN(x)) {
|
||||||
|
|||||||
Reference in New Issue
Block a user