[IMP] fix

bzr revid: fp@openerp.com-20120507230826-7tsxcleqv3zog8yh
This commit is contained in:
Fabien Pinckaers 2012-05-08 01:08:26 +02:00
parent f717620586
commit 376530539c
1 changed files with 3 additions and 6 deletions

View File

@ -227,7 +227,7 @@ instance.web_graph.GraphView = instance.web.View.extend({
)
},
graph_get_data: function (options, callback) {
graph_get_data: function (callback) {
var data = this.rpc(
'/web_graph/graph/data_get',
{
@ -247,22 +247,19 @@ instance.web_graph.GraphView = instance.web.View.extend({
// Render the graph and update menu styles
graph_render: function (options) {
var mode_options, i;
var i;
var self = this;
mode_options = (this.mode=='area')?{lines: {fill: true}}:{}
if (options)
for (i in options.data)
this[i] = options.data[i];
return this.graph_get_data(mode_options,
return this.graph_get_data(
function (result) {
// TODO: apply mode_options on all result.data
var i;
if (self.mode=='area')
for (i=0; i<result.data.length; i++) {
result.data[i].lines = {fill: true}
}
self.graph_render_all(options, result)
}
);