diff options
| author | Gery Debongnie <ged@openerp.com> | 2013-12-24 15:09:42 +0100 |
|---|---|---|
| committer | Gery Debongnie <ged@openerp.com> | 2013-12-24 15:09:42 +0100 |
| commit | 69f6efa000e5368462fa3a0c66577d0f405334f0 (patch) | |
| tree | 30d7e0fa90241cdd3f3f90c6980042c30c68a4eb /addons/web_graph/static/src | |
| parent | 457090c1a3bbf4931ef3579cc7ca6d4a6c5765b3 (diff) | |
[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
Diffstat (limited to 'addons/web_graph/static/src')
| -rw-r--r-- | addons/web_graph/static/src/js/graph.js | 2 |
1 files changed, 2 insertions, 0 deletions
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) |
