diff options
| author | Christophe Simonis <chs@openerp.com> | 2012-09-24 13:54:26 +0200 |
|---|---|---|
| committer | Christophe Simonis <chs@openerp.com> | 2012-09-24 13:54:26 +0200 |
| commit | d41d28ea5f9cbd31e44560f171cab6c1966615b0 (patch) | |
| tree | a35b8cad3ed04b70c60d0d5828009191bd05c986 /addons/web_graph/static/src/js | |
| parent | 443a7ec6cc8c08e940f4a4dbc31ae4528a041381 (diff) | |
| parent | f7255ac0b3b7e6b3d2dc67b571f7a169b2019598 (diff) | |
merge upstream
bzr revid: chs@openerp.com-20120921145630-7ejla348yybsy890
bzr revid: chs@openerp.com-20120924115426-84no8926sccaymmt
Diffstat (limited to 'addons/web_graph/static/src/js')
| -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 : { |
