summaryrefslogtreecommitdiff
path: root/addons/web_graph/static/src/js/graph.js
diff options
context:
space:
mode:
authorGery Debongnie <ged@openerp.com>2013-11-28 15:51:55 +0100
committerGery Debongnie <ged@openerp.com>2013-11-28 15:51:55 +0100
commite2d2d51b7a7e9a77cb8b89e4adee35763e61201a (patch)
treef90f2485e37425f6853538b746e02d214d8a4776 /addons/web_graph/static/src/js/graph.js
parent8013a154b80766779cbe2cbad101bc3669e0e41f (diff)
[IMP] supports the attribute 'type' in the xml definition of the graph view, at least for bar_charts (addon web_graph)
bzr revid: ged@openerp.com-20131128145155-b5w4fhw9vrp9txuc
Diffstat (limited to 'addons/web_graph/static/src/js/graph.js')
-rw-r--r--addons/web_graph/static/src/js/graph.js4
1 files changed, 4 insertions, 0 deletions
diff --git a/addons/web_graph/static/src/js/graph.js b/addons/web_graph/static/src/js/graph.js
index 450a86a470a..77f444948b5 100644
--- a/addons/web_graph/static/src/js/graph.js
+++ b/addons/web_graph/static/src/js/graph.js
@@ -122,6 +122,10 @@ instance.web_graph.GraphView = instance.web.View.extend({
model = new instance.web.Model(fields_view_get.model, {group_by_no_leaf: true}),
row_groupby = [];
+ if (fields_view_get.arch.attrs.type === 'bar') {
+ this.mode = 'bar_chart';
+ }
+
// get the default groupbys and measure defined in the field view
_.each(fields_view_get.arch.children, function (field) {
if ('name' in field.attrs) {