From a9bcb12f6419aaf087bad4c8a3f7ed7c00dbf3c5 Mon Sep 17 00:00:00 2001 From: Mathieu Duckerts-Antoine Date: Thu, 21 Feb 2019 14:29:26 +0000 Subject: [IMP] web: graph view improvements This commit extends the support of comparison mode for the graph view and refine the tooltips and rendering in line mode. The graph view code has also been slightly refactored. Task ID: 1946138 --- addons/web/static/src/js/views/graph/graph_controller.js | 16 +++++----------- 1 file changed, 5 insertions(+), 11 deletions(-) (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 15f7fbeaa35..a88a94b786f 100644 --- a/addons/web/static/src/js/views/graph/graph_controller.js +++ b/addons/web/static/src/js/views/graph/graph_controller.js @@ -71,13 +71,7 @@ var GraphController = AbstractController.extend(GroupByMenuMixin,{ context: { graph_measure: state.measure, graph_mode: state.mode, - graph_groupbys: state.groupedBy, - // this parameter is not used anywher for now - // the idea would be to seperate intervals from - // fieldnames in groupbys. This could be done - // in graph view only or everywhere but this is - // a big refactoring. - graph_intervalMapping: state.intervalMapping, + graph_groupbys: state.groupBy, } }; }, @@ -115,10 +109,10 @@ var GraphController = AbstractController.extend(GroupByMenuMixin,{ * override * * @private - * @param {string[]} groupBys + * @param {string[]} groupBy */ - _setGroupby: function (groupBys) { - this.update({groupBy: groupBys}); + _setGroupby: function (groupBy) { + this.update({groupBy: groupBy}); }, /** @@ -127,7 +121,7 @@ var GraphController = AbstractController.extend(GroupByMenuMixin,{ * * private * - * @param {string} mode one of 'pie', 'line' or 'bar' + * @param {'pie'|'line'|'bar'} mode */ _setMode: function (mode) { this.update({mode: mode}); -- cgit v1.2.3