summaryrefslogtreecommitdiff
path: root/addons/web_graph/static/src/js/graph_view.js
diff options
context:
space:
mode:
authorRaphael Collet <rco@openerp.com>2014-08-22 17:51:20 +0200
committerRaphael Collet <rco@openerp.com>2014-08-22 17:51:20 +0200
commit2ad092b5e54fa39a906b38d9240e08b9800ea0da (patch)
tree1879c2a6efe8ed1626d92635870aaff922306492 /addons/web_graph/static/src/js/graph_view.js
parent97256fa1fba6c7d3d02962b5948158d17852cf43 (diff)
[ADD] doc: new documentation, with training tutorials, and new scaffolding
Diffstat (limited to 'addons/web_graph/static/src/js/graph_view.js')
-rw-r--r--addons/web_graph/static/src/js/graph_view.js27
1 files changed, 12 insertions, 15 deletions
diff --git a/addons/web_graph/static/src/js/graph_view.js b/addons/web_graph/static/src/js/graph_view.js
index 4a81ceaa98c..953de133ef9 100644
--- a/addons/web_graph/static/src/js/graph_view.js
+++ b/addons/web_graph/static/src/js/graph_view.js
@@ -52,24 +52,21 @@ instance.web_graph.GraphView = instance.web.View.extend({
if (_.has(field.attrs, 'interval')) {
field_name = field.attrs.name + ':' + field.attrs.interval;
}
- if (_.has(field.attrs, 'type')) {
- switch (field.attrs.type) {
- case 'row':
- self.widget_config.row_groupby.push(field_name);
- break;
- case 'col':
- self.widget_config.col_groupby.push(field_name);
- break;
- case 'measure':
- self.widget_config.measures.push(field_name);
- break;
- }
- } else { // old style, kept for backward compatibility
+ //noinspection FallThroughInSwitchStatementJS
+ switch (field.attrs.type) {
+ case 'measure':
+ self.widget_config.measures.push(field_name);
+ break;
+ case 'col':
+ self.widget_config.col_groupby.push(field_name);
+ break;
+ default:
if ('operator' in field.attrs) {
self.widget_config.measures.push(field_name);
- } else {
- self.widget_config.row_groupby.push(field_name);
+ break;
}
+ case 'row':
+ self.widget_config.row_groupby.push(field_name);
}
});
if (self.widget_config.measures.length === 0) {