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