From a533b9f29090e56bbffbabb90628cd117c166d62 Mon Sep 17 00:00:00 2001 From: Adrien Dieudonne Date: Wed, 19 Sep 2018 11:42:43 +0200 Subject: [FIX] web: graph_renderer: show graph title Since odoo/enterprise@e3b0d2a, the title wasn't set anymore. This logic is now moved in the graph renderer to be able to set a title in every graphs. For now, we only use the title attribute for pie charts embedded in dashboard views. Additional tests has been added in 'web_dashboard' (enterprise). --- addons/web/static/src/js/views/graph/graph_view.js | 1 + 1 file changed, 1 insertion(+) (limited to 'addons/web/static/src/js/views/graph/graph_view.js') diff --git a/addons/web/static/src/js/views/graph/graph_view.js b/addons/web/static/src/js/views/graph/graph_view.js index 23ab4cecd01..a55da16c6da 100644 --- a/addons/web/static/src/js/views/graph/graph_view.js +++ b/addons/web/static/src/js/views/graph/graph_view.js @@ -81,6 +81,7 @@ var GraphView = AbstractView.extend({ this.controllerParams.measures = measures; this.controllerParams.groupableFields = groupableFields; this.rendererParams.stacked = this.arch.attrs.stacked !== "False"; + this.rendererParams.title = this.arch.attrs.title; // TODO: use attrs.string instead this.loadParams.mode = this.arch.attrs.type || 'bar'; this.loadParams.measure = measure || '__count__'; -- cgit v1.2.3