[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
This commit is contained in:
Gery Debongnie 2013-12-24 15:09:42 +01:00
parent 457090c1a3
commit 69f6efa000
1 changed files with 2 additions and 0 deletions

View File

@ -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)