[FIX] fixes a crash in line chart mode when the view had more than one measure (addon web_graph)

bzr revid: ged@openerp.com-20140124152536-an2aelpaa43ivzjw
This commit is contained in:
Gery Debongnie
2014-01-24 16:25:36 +01:00
parent c43147628b
commit 7b4f2df8be
@@ -630,7 +630,7 @@ openerp.web_graph.Graph = openerp.web.Widget.extend({
var data = _.map(this.pivot.get_cols_leaves(), function (col) {
var values = _.map(self.pivot.get_rows_with_depth(dim_x), function (row) {
return {x: row.title, y: self.pivot.get_values(row.id,col.id, 0)};
return {x: row.title, y: self.pivot.get_values(row.id,col.id)[0] || 0};
});
var title = _.map(col.path, function (p) {
return p || 'Undefined';