diff options
| author | Christophe Simonis <chs@odoo.com> | 2016-04-12 11:56:44 +0200 |
|---|---|---|
| committer | Christophe Simonis <chs@odoo.com> | 2016-04-12 11:56:44 +0200 |
| commit | 21c7ef8bf5aeaf457573276e06a77c0f0cb50f98 (patch) | |
| tree | f5e32fd9fbff5fe59d76b1a05e6dc8984e46ab38 /addons/web/static/src/js/views/graph_widget.js | |
| parent | 887108b1c4a49d6c6109f749fe8d434b874699af (diff) | |
| parent | eb443410ff0bd1bbec33a8d76dc9b279dbf34d70 (diff) | |
[MERGE] forward port of branch saas-9 up to eb44341
Diffstat (limited to 'addons/web/static/src/js/views/graph_widget.js')
| -rw-r--r-- | addons/web/static/src/js/views/graph_widget.js | 6 |
1 files changed, 4 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 340050eb0dc..a86ea35e449 100644 --- a/addons/web/static/src/js/views/graph_widget.js +++ b/addons/web/static/src/js/views/graph_widget.js @@ -4,6 +4,7 @@ odoo.define('web.GraphWidget', function (require) { var config = require('web.config'); var core = require('web.core'); var Model = require('web.DataModel'); +var formats = require('web.formats'); var Widget = require('web.Widget'); var _t = core._t; @@ -24,6 +25,7 @@ return Widget.extend({ this.groupbys = options.groupbys || []; this.mode = options.mode || "bar"; this.measure = options.measure || "__count__"; + this.stacked = options.stacked; }, start: function () { return this.load_data().then(this.proxy('display_graph')); @@ -167,12 +169,12 @@ return Widget.extend({ showXAxis: true, showYAxis: true, rightAlignYAxis: false, - stacked: true, + stacked: this.stacked, reduceXTicks: false, // rotateLabels: 40, showControls: (this.groupbys.length > 1) }); - chart.yAxis.tickFormat(function(d) { return openerp.web.format_value(d, { type : 'float' });}); + chart.yAxis.tickFormat(function(d) { return formats.format_value(d, { type : 'float' });}); chart(svg); this.to_remove = chart.update; |
