diff options
| author | Christophe Simonis <chs@odoo.com> | 2016-11-17 15:27:29 +0100 |
|---|---|---|
| committer | Christophe Simonis <chs@odoo.com> | 2016-11-17 15:27:29 +0100 |
| commit | e2fcace05e244bbf65da75680fe62c96eeb58455 (patch) | |
| tree | 738a2b396b4326ff92b2012dd4bc87c97b9ffb68 /addons/web/static/src/js/views/graph_widget.js | |
| parent | 41cebc4637b7aa15fcf25229746bb252f9745d4e (diff) | |
| parent | 13dc7041a6b47bbcc703b855044f41321145c7ab (diff) | |
[MERGE] forward port branch 10.0 up to 13dc704
Diffstat (limited to 'addons/web/static/src/js/views/graph_widget.js')
| -rw-r--r-- | addons/web/static/src/js/views/graph_widget.js | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/addons/web/static/src/js/views/graph_widget.js b/addons/web/static/src/js/views/graph_widget.js index 80a575d0505..b2cd726c95c 100644 --- a/addons/web/static/src/js/views/graph_widget.js +++ b/addons/web/static/src/js/views/graph_widget.js @@ -98,7 +98,8 @@ return Widget.extend({ "there is no active filter in the search bar."), })); } else { - this['display_' + this.mode](); + var chart = this['display_' + this.mode](); + chart.tooltip.chartContainer(this.$el[0]); } }, display_bar: function () { @@ -182,6 +183,8 @@ return Widget.extend({ chart(svg); this.to_remove = chart.update; nv.utils.onWindowResize(chart.update); + + return chart; }, display_pie: function () { var data = [], @@ -232,6 +235,8 @@ return Widget.extend({ chart(svg); this.to_remove = chart.update; nv.utils.onWindowResize(chart.update); + + return chart; }, display_line: function () { if (this.data.length < 2) { @@ -309,7 +314,9 @@ return Widget.extend({ chart(svg); this.to_remove = chart.update; - nv.utils.onWindowResize(chart.update); + nv.utils.onWindowResize(chart.update); + + return chart; }, destroy: function () { nv.utils.offWindowResize(this.to_remove); |
