summaryrefslogtreecommitdiff
path: root/addons/web_graph/static/src/js/graph.js
diff options
context:
space:
mode:
Diffstat (limited to 'addons/web_graph/static/src/js/graph.js')
-rw-r--r--addons/web_graph/static/src/js/graph.js8
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 : {