diff options
| author | Christophe Matthieu <chm@openerp.com> | 2012-09-18 17:32:38 +0200 |
|---|---|---|
| committer | Christophe Matthieu <chm@openerp.com> | 2012-09-18 17:32:38 +0200 |
| commit | a02496b5f88cff1e8332d6ddf1f41c8516fd7b3e (patch) | |
| tree | 735b82b9586bee3fa20fc9bb4d13d0ca2697b0cc /addons/web_graph/static/src | |
| parent | 3fd98b0f80f4bfe20fbced3f4990f79065b06b1e (diff) | |
| parent | b08efa691824370130be1f009472ba7f59096127 (diff) | |
[MERGE] from trunk
bzr revid: chm@openerp.com-20120918153238-s0vvfwy5thpk8imc
Diffstat (limited to 'addons/web_graph/static/src')
| -rw-r--r-- | addons/web_graph/static/src/js/graph.js | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/addons/web_graph/static/src/js/graph.js b/addons/web_graph/static/src/js/graph.js index b3fef54d094..b82b1521e87 100644 --- a/addons/web_graph/static/src/js/graph.js +++ b/addons/web_graph/static/src/js/graph.js @@ -142,9 +142,11 @@ instance.web_graph.GraphView = instance.web.View.extend({ options_bar: function (data) { var min = _(data.data).chain() .map(function (record) { - return _.min(record.data, function (item) { - return item[1]; - })[1]; + if (record.data.length > 0){ + return _.min(record.data, function (item) { + return item[1]; + })[1]; + } }).min().value(); return { bars : { |
