From adeeb0149ad6a4c894cc4c46d568a6a5eff9ac5a Mon Sep 17 00:00:00 2001 From: Mathieu Duckerts-Antoine Date: Wed, 5 Jun 2019 12:03:43 +0000 Subject: [IMP] web: bar charts not stacked if not enough datasets Co-Authored-By: Thomas Werland --- addons/web/static/src/js/views/graph/graph_controller.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'addons/web/static/src/js/views/graph/graph_controller.js') diff --git a/addons/web/static/src/js/views/graph/graph_controller.js b/addons/web/static/src/js/views/graph/graph_controller.js index 9e2ebfc0a78..8cfed52a050 100644 --- a/addons/web/static/src/js/views/graph/graph_controller.js +++ b/addons/web/static/src/js/views/graph/graph_controller.js @@ -172,7 +172,7 @@ var GraphController = AbstractController.extend(GroupByMenuMixin,{ .find('.o_graph_button[data-mode="stack"]') .data('stacked', state.stacked) .toggleClass('active', state.stacked) - .toggleClass('o_hidden', state.mode !== 'bar'); + .toggleClass('o_hidden', state.mode !== 'bar' || !this.renderer.isStackable); _.each(this.$measureList.find('.dropdown-item'), function (item) { var $item = $(item); $item.toggleClass('selected', $item.data('field') === state.measure); -- cgit v1.2.3