diff --git a/addons/web_graph/static/src/js/graph.js b/addons/web_graph/static/src/js/graph.js index 6363894292b..6cf9998fdda 100644 --- a/addons/web_graph/static/src/js/graph.js +++ b/addons/web_graph/static/src/js/graph.js @@ -273,7 +273,8 @@ openerp.web_graph.GraphView = openerp.web.View.extend({ view: view_chart, container: self.element_id+"-"+self.chart+"chart", value:"#"+group_list[0].group+"#", - gradient: "3d", + gradient: (self.chart == "bar") ? "3d" : "light", + alpha: (self.chart == "area") ? 0.6 : 1, border: false, width: 1024, tooltip:{ @@ -281,7 +282,15 @@ openerp.web_graph.GraphView = openerp.web.View.extend({ self.abscissa, group_list[0].text, group_list[0].group) }, radius: 0, - color:group_list[0].color, + color: (self.chart != "line") ? group_list[0].color : "", + item: (self.chart == "line") ? { + borderColor: group_list[0].color, + color: "#000000" + } : "", + line: (self.chart == "line") ? { + color: group_list[0].color, + width: 3 + } : "", origin:0, xAxis: x_axis, yAxis: y_axis, @@ -299,16 +308,7 @@ openerp.web_graph.GraphView = openerp.web.View.extend({ } } }); - if (self.chart == 'line'){ - charts.define("item",{ - borderColor: group_list[0].color, - color: "#000000" - }); - charts.define("line",{ - color: group_list[0].color, - width: 3 - }); - } + for (var m = 1; m