From: Eero T. <eer...@ne...> - 2005-01-29 20:59:04
|
Hi, I've just added some new features to the StatisticsChart plugin in CVS HEAD: - Five new statistics chart types: - Child counts - Marriage places - Marriage ages - Ages when first child was born - Ages when last child was born (These use Don's new age calculation function in ReportUtils, thanks!) - Pie charts with a legend are used instead of Bar charts if the number of items in the chart is below a user definable number. Pie charts and legend are produced with Don's new ReportUtils functions. Bar charts are still drawn with my own code (I want labels right aligned with bars, and needing a legend for a barchart seems kind of redundant) However, I'm having problems with Gramps output: * OpenOffice: - String widths are calculated incorrectly (stable version has same problem with StatisticsChart) - Although I select statistics_chart.sxw as the file name, it will create/overwrite a file named as statistics_chart.sxx.sxw * PDF: - Doesn't show the legend at all, otherwise looks nicer than OO output * PS: - Shows just the boxes for legend, but doesn't fill them or include the text You can see examples of the problems (and new StatisticsChart features :)) here: http://www.netsonic.fi/~vellam12/bin/statistics_chart.sxx.sxw http://www.netsonic.fi/~vellam12/bin/statistics_chart.pdf http://www.netsonic.fi/~vellam12/bin/statistics_chart.ps If you have suggestions for better Pie output colors (rgb triplet values), please mail me... Btw. When I select the "Print..." output option for the report, I get the following traceback: ----------- GRAMPS has encountered an internal error. Please copy the message below and post a bug report at http://sourceforge.net/projects/gramps or send an email message to gra...@li... GRAMPS : 1.1.4-0.CVS20050129 LANG : en_US.UTF-8 Python : 2.3.3 final GTK : 2.4.9 PyGTK : 2.3.91 OS : SuSE Linux 9.1 (i586) Traceback (most recent call last): File "/home/eero/garnome/share/gramps/Report.py", line 1765, in report MyReport.write_report() File "/home/eero/.gramps/plugins/StatisticsChart.py", line 609, in write_report self.output_piechart(data[0], data[1], data[2]) File "/home/eero/.gramps/plugins/StatisticsChart.py", line 638, in output_piechart ReportUtils.draw_legend(self.doc, 2, yoffset, chart_data) File "/home/eero/garnome/share/gramps/ReportUtils.py", line 118, in draw_legend doc.write_at(format, legend, start_x + (3*size), start_y - (size*0.25)) File "/home/eero/garnome/share/gramps/docgen/LPRDoc.py", line 1069, in write_at para_style = self.style_list[style] KeyError: 'SC-color-0' ----------- - Eero |