[IMP] remove print statement
bzr revid: fp@openerp.com-20120507224530-3scu1akm6rpxwzzj
This commit is contained in:
@@ -40,7 +40,6 @@ class GraphView(View):
|
||||
|
||||
assert len(xaxis), "No field for the X axis!"
|
||||
assert len(yaxis), "No field for the Y axis!"
|
||||
print "X", xaxis, "Y", yaxis
|
||||
|
||||
# Convert a field's data into a displayable string
|
||||
|
||||
@@ -82,21 +81,12 @@ class GraphView(View):
|
||||
axis = obj.read_group(domain, yaxis+xaxis[0:1], xaxis[0:1], context=context)
|
||||
for x in axis:
|
||||
key = x[xaxis[0]]
|
||||
print key
|
||||
print x
|
||||
res = obj.read_group(domain+[(xaxis[0],'=',_convert_key(xaxis[0], key))], yaxis+xaxis[1:2], xaxis[1:2], context=context)
|
||||
print '*', res
|
||||
print '**', xaxis[1]
|
||||
result.append( {
|
||||
'data': map(lambda record: _orientation(_convert(xaxis[1], record[xaxis[1]]), record[yaxis[0]]), res),
|
||||
'label': _convert(xaxis[0], key, tick=False)
|
||||
})
|
||||
|
||||
|
||||
print '---'
|
||||
print '-', result
|
||||
print '-', map(lambda x: (x[1], x[0]), ticks.items())
|
||||
|
||||
return {
|
||||
'data': result,
|
||||
'ticks': map(lambda x: (x[1], x[0]), ticks.items())
|
||||
|
||||
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user