[reportlab-users] Problem in the chart display code
andy at reportlab.com
Tue Jun 7 03:34:12 EDT 2011
On 7 June 2011 00:37, Soumya Mishra <mishras at vmware.com> wrote:
> Hi all,
> I am writing this simple code to display a chart in pdf and other formats
> while collecting data to be displayed from mysql data database.
> The code is running w/o errors but yet the files are not generated. Please
I'm happy to see you're evaluating Diagra - if you need any more help
feel free to ask, or contact us on enquiries at reportlab.com if you
don't want to chat on a public list.
It runs for me (after changing the password!) and produces a
subdirectory called 'output', with 3 charts called pleaserun.eps,
pleaserun.gif, pleaserun.pdf. But normally fileNamePattern would
have a '%s' or '%03d' or something in it, so that the chart ID can be
substituted in to get multiple filenames. Your current code will be
creating a file "pleaserun.pdf" repeatedly. If you set
self.fileNamePattern = 'pleaserun%03d'
...you'll get lots of numbered charts.
Try "python mychart.py --verbose" - the output shows where it is
putting the charts and what it is calling them.
ReportLab Europe Ltd.
Media House, 3 Palmerston Road, Wimbledon, London SW19 1PG, UK
More information about the reportlab-users