diff options
| author | Jay Vora <jvo@tinyerp.com> | 2008-10-17 13:03:47 +0530 |
|---|---|---|
| committer | Jay Vora <jvo@tinyerp.com> | 2008-10-17 13:03:47 +0530 |
| commit | 89777aeaeb18b7bf64a28444cea4e1eefc1ee4a1 (patch) | |
| tree | a572f90b0b94a29db4ce0f3f1ed545ef9b60cd4f /addons | |
| parent | fa7bf2568301aa1afa28ca932449b0d14f6e8314 (diff) | |
Account_report:Added beautiful graph in report
bzr revid: jvo@tinyerp.com-20081017073347-vq2mk2e478bsj7ab
Diffstat (limited to 'addons')
| -rw-r--r-- | addons/account_report/report/print_indicator.py | 9 | ||||
| -rw-r--r-- | addons/account_report/report/print_indicator.rml | 2 |
2 files changed, 8 insertions, 3 deletions
diff --git a/addons/account_report/report/print_indicator.py b/addons/account_report/report/print_indicator.py index ec0e84fb314..0edc802c7a1 100644 --- a/addons/account_report/report/print_indicator.py +++ b/addons/account_report/report/print_indicator.py @@ -45,6 +45,9 @@ from report.interface import report_int from pychart import * import StringIO theme.use_color = 1 +theme.default_font_family = "Helvetica-Bold" +theme.default_font_size = 18 +theme.default_line_width = 1.0 import tools @@ -223,20 +226,22 @@ class accounting_report_indicator(report_sxw.rml_parse): os.mkdir('./' + dirname + '/') pdf_string = StringIO.StringIO() can = canvas.init('Image'+str(self.count)+".png") +# can.clip(0,0,600,400) chart_object.set_defaults(line_plot.T, line_style=None) data=zip(self.header_name,self.header_val) - ar = area.T(size = (400,200),x_coord = category_coord.T(data, 0), y_range = (0, None), + ar = area.T(size = (650,450),x_coord = category_coord.T(data, 0), y_range = (None, None), x_axis = axis.X(label="Period//Year",format="/a-30{}%s"), y_axis = axis.Y(label="Value")) - ar.add_plot(bar_plot.T(data = data, label = "Value",fill_style=fill_style.red)) + ar.add_plot(bar_plot.T(data = data,width=15, data_label_format="/o/17{}%s",label = "Value",fill_style=fill_style.red)) ar.draw() can.close() os.system('cp '+'Image'+str(self.count)+'.png ' +path+str(self.count)+'.png') os.system('rm '+'Image'+str(self.count)+'.png') +# can.endclip() return path+str(self.count)+'.png' report_sxw.report_sxw('report.print.indicators', 'account.report.history', diff --git a/addons/account_report/report/print_indicator.rml b/addons/account_report/report/print_indicator.rml index 6727812fc6f..479eb853424 100644 --- a/addons/account_report/report/print_indicator.rml +++ b/addons/account_report/report/print_indicator.rml @@ -128,7 +128,7 @@ <para style="P3"> <font color="white"> </font> </para> -<para style="P1">[[ o['disp_graph'] and setTag('para','image',{'file':test(data['form'],o)}) or removeParentNode('para') ]]</para> +<para style="P1">[[ o['disp_graph'] and setTag('para','image',{'width':'450.00','height':'200.00','file':test(data['form'],o)}) or removeParentNode('para') ]]</para> <para style="P3"> <font color="white"> </font> </para> |
