summaryrefslogtreecommitdiff
path: root/addons/web_graph/static/src/js/graph.js
diff options
context:
space:
mode:
authorGery Debongnie <ged@openerp.com>2014-01-03 15:44:18 +0100
committerGery Debongnie <ged@openerp.com>2014-01-03 15:44:18 +0100
commit47762dfca2c49a8da9f9fd1b57f966a27d96f602 (patch)
tree69f48cce60d429ef8d7e9f63f1f58546135eac35 /addons/web_graph/static/src/js/graph.js
parent64775d40988ebff185a01797ac502e2ca12167bf (diff)
[IMP] allows the selection of multiple measures in graph view (addon web_graph)
bzr revid: ged@openerp.com-20140103144418-7mstnfwah6v6jkkx
Diffstat (limited to 'addons/web_graph/static/src/js/graph.js')
-rw-r--r--addons/web_graph/static/src/js/graph.js8
1 files changed, 6 insertions, 2 deletions
diff --git a/addons/web_graph/static/src/js/graph.js b/addons/web_graph/static/src/js/graph.js
index 93cac5146ec..e8e4e561ef4 100644
--- a/addons/web_graph/static/src/js/graph.js
+++ b/addons/web_graph/static/src/js/graph.js
@@ -344,7 +344,7 @@ instance.web_graph.Graph = instance.web.Widget.extend({
measure_selection: function (event) {
event.preventDefault();
var measure = event.target.attributes['data-choice'].nodeValue;
- this.pivot.config({measures:[measure]});
+ this.pivot.config({toggle_measure:measure});
},
option_selection: function (event) {
@@ -421,7 +421,11 @@ instance.web_graph.Graph = instance.web.Widget.extend({
******************************************************************************/
draw_table: function () {
this.pivot.rows.main.title = 'Total';
- this.pivot.cols.main.title = this.title;
+ if (this.pivot.measures.length == 1) {
+ this.pivot.cols.main.title = this.measure_label(this.pivot.measures[0]);
+ } else {
+ this.pivot.cols.main.title = this.title;
+ }
this.draw_top_headers();
_.each(this.pivot.rows.headers, this.proxy('draw_row'));
},