This is the version..
==========================================================
Release Notes Notes 16th Nov 2012
Build 2012.10.08.001
----------------------------------------------------------
Code below is straight from your examples at demos/Features Chart Styles>Standard>Line 2D. I can make the image up to about 6050x600 px, at 6100x600 px it will error out with this..
Fatal error: Allowed memory size of 67108864 bytes exhausted (tried to allocate 24400 bytes) in C:\xampp\htdocs\CPDT\CPDT\charts\sources\GraphicsGD.php on line 587
Code: Select all
$chart = new TChart(6100,600);
$chart->getAspect()->setView3D(false);
$chart->getHeader()->setText("2D Line Chart");
$chart->getAxes()->getLeft()->setMinimumOffset(10);
$chart->getAxes()->getLeft()->setMaximumOffset(10);
$chart->getAxes()->getBottom()->setMinimumOffset(10);
$chart->getAxes()->getBottom()->setMaximumOffset(10);
$line1=new Line($chart->getChart());
$data = Array(10,50,25,175,125,200,175);
$line1->addArray($data);
$line2=new Line($chart->getChart());
$line2->addXY(0,10);
$line2->addXY(1,15);
$line2->addXY(2,20);
$line2->addXY(3,25);
$line2->addXY(10,30);
/* You can also use one of the following methods , in the case you want to
specify a text or color for each point :
$line2->addXYColor(x,y,color)
$line2->addXYText(x,y,text)
$line2->addXYTextColor(x,y,text,color)
*/
$line3=new Line($chart->getChart());
$data = Array(200,175,175,100,65,110,90);
$line3->addArray($data);
foreach ($chart->getSeries() as $serie) {
$pointer = $serie->getPointer();
$pointer->setVisible(true);
$pointer->getPen()->setVisible(false);
$pointer->setHorizSize(3);
$pointer->setVertSize(3);
$marks = $serie->getMarks();
$marks->setVisible(true);
$marks->setArrowLength(5);
$marks->getArrow()->setVisible(false);
$marks->setTransparent(true);
}
$line1->getPointer()->setStyle(PointerStyle::$CIRCLE);
$line2->getPointer()->setStyle(PointerStyle::$TRIANGLE);
$line2->getLinePen()->setStyle(DashStyle::$DASH);
$chart->render("chart1.png");
$rand=rand();
print '<font face="Verdana" size="2">Line 2D Style<p>';
print '<img src="chart1.png?rand='.$rand.'">';
My actual code has more information and much greater y and x values, but the image size restriction is still pretty close to the same as your simple example chart. So it is not an issue of stretching the x axis or anything. As stated previously, if you have an x axis in feet running 8 miles or more and y values every 5 feet or so, you need a good image width to scroll for any detail or you are just looking at a scrunched accordian.
If you change the class file from imagecreatetruecolor to just imagecreate, you can get a little bit wider, but other things like color in any band coloring may go to gray, etc.