From 69f6efa000e5368462fa3a0c66577d0f405334f0 Mon Sep 17 00:00:00 2001 From: Gery Debongnie Date: Tue, 24 Dec 2013 15:09:42 +0100 Subject: [PATCH] [IMP] hides controls (stacked/grouped) in graph view when they are useless (i.e., when there's only one dimension which can't be stacked/grouped (addon web_graph) bzr revid: ged@openerp.com-20131224140942-w0dwy3ck6yslbhxy --- addons/web_graph/static/src/js/graph.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/addons/web_graph/static/src/js/graph.js b/addons/web_graph/static/src/js/graph.js index 8a7ac4811b6..c155337d90e 100644 --- a/addons/web_graph/static/src/js/graph.js +++ b/addons/web_graph/static/src/js/graph.js @@ -579,6 +579,8 @@ instance.web_graph.Graph = instance.web.Widget.extend({ .stacked(self.bar_ui === 'stack') .staggerLabels(true); + if (dim_x === 1 && dim_y === 0) { chart.showControls(false); } + d3.select(self.svg) .datum(data) .attr('width', self.width)