pChart 2.x forum
http://wiki.pchart.net/forum/

Two charts or more on one page?
http://wiki.pchart.net/forum/viewtopic.php?f=3&t=1578
Page 1 of 1

Author:  mtbartlett [ Thu Jun 23, 2011 3:01 pm ]
Post subject:  Two charts or more on one page?

Is this possible? When I try to include another graph I get an error in my logs that states cannot redeclare class pDraw.

Mike

Author:  Wilwarin [ Fri Jun 24, 2011 8:04 pm ]
Post subject:  Re: Two charts or more on one page?

You may just place the charts in different php files and then insert them by img tags (works as well with php files with images in them)

Author:  chartbreaker [ Thu Aug 04, 2011 10:05 pm ]
Post subject:  Re: Two charts or more on one page?

another solution (using same style for 6 series in 3 charts) is to include the classes
pData.class.php
pDraw.class.php
pImage.class.php
in the final page which will be published

in another page I let draw my chart
the chart is rendered as flat image to a directory
series-arrays, labels etc. and the destinaton (path/filename) are defined as variables

the final page imports needed data from file
the chart-rendering page is included 3 times after changing the variables for each include

a simple echo command inserts an img-Tag for each picture before the next include is called

Page 1 of 1 All times are UTC
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
http://www.phpbb.com/