[#151,view/graph,bugfix][xs]: parse string as numbers if we can when plotting them - fixes #151.
This commit is contained in:
@@ -260,7 +260,10 @@ my.Graph = Backbone.View.extend({
|
|||||||
var yfield = self.model.fields.get(field);
|
var yfield = self.model.fields.get(field);
|
||||||
var y = doc.getFieldValue(yfield);
|
var y = doc.getFieldValue(yfield);
|
||||||
if (typeof x === 'string') {
|
if (typeof x === 'string') {
|
||||||
x = index;
|
x = parseFloat(x);
|
||||||
|
if (isNaN(x)) {
|
||||||
|
x = index;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
// horizontal bar chart
|
// horizontal bar chart
|
||||||
if (self.state.attributes.graphType == 'bars') {
|
if (self.state.attributes.graphType == 'bars') {
|
||||||
|
|||||||
Reference in New Issue
Block a user