summaryrefslogtreecommitdiff
path: root/addons/web_graph/static/src/js
diff options
context:
space:
mode:
Diffstat (limited to 'addons/web_graph/static/src/js')
-rw-r--r--addons/web_graph/static/src/js/graph.js5
1 files changed, 4 insertions, 1 deletions
diff --git a/addons/web_graph/static/src/js/graph.js b/addons/web_graph/static/src/js/graph.js
index cebc51e5690..df2b11eb004 100644
--- a/addons/web_graph/static/src/js/graph.js
+++ b/addons/web_graph/static/src/js/graph.js
@@ -20,7 +20,7 @@ instance.web_graph.GraphView = instance.web.View.extend({
this.view_id = view_id;
this.mode="bar"; // line, bar, area, pie, radar
- this.orientation=true; // true: horizontal, false: vertical
+ this.orientation=false; // true: horizontal, false: vertical
this.stacked=true;
this.spreadsheet=false; // Display data gris, allows copy to CSV
@@ -49,6 +49,9 @@ instance.web_graph.GraphView = instance.web.View.extend({
this.fields_view = fields_view_get;
this.container = this.$element.find("#editor-render-body");
+ this.mode = this.fields_view.arch.attrs.type || 'bar';
+ this.orientation = this.fields_view.arch.attrs.orientation == 'horizontal';
+
width = this.$element.parent().width();
this.container.css("width", width);
this.$element.css("width", width);