Is there a way to draw a 3D Bar Graph using the pChart library in PHP?
I m able to draw a 3D Pie graph but not a line graph.
My code looks as follows
//The 3D bar graph
# // Dataset definition
$DataSet = new pData;
// $DataSet->AddPoint(array(10,40,30,20,30,30,20,10,10,70,40),"Serie1");
$DataSet->AddPoint(52,"Serie2","January 2009");
$DataSet->AddPoint(94,"Serie2","February 2009");
$DataSet->AddPoint(44,"Serie2","March 2009");
$DataSet->AddPoint(65,"Serie2","April 2009");
$DataSet->AddPoint(38,"Serie2","May 2009");
$DataSet->AddPoint(43,"Serie2","August 2009");
$DataSet->AddPoint(34,"Serie2","September 2009");
$DataSet->AddAllSeries();
$DataSet->SetAbsciseLabelSerie();
$DataSet->SetSerieName("Months","Serie2");
//$DataSet->SetXAxisFormat("date");
// $DataSet->SetXAxisUnit("months");
// Initialise the graph
$Test = new pChart(800,240);
$Test->setFixedScale(0,100);
$Test->loadColorPalette( pChart.1.26e/color/tones-4.txt , , );
$Test->setFontProperties("pChart.1.26e/Fonts/FreeSans.ttf",8);
$Test->setGraphArea(50,30,680,200);
$Test->drawFilledRoundedRectangle(7,7,693,223,5,255,255,255);
$Test->drawRectangle(10,5,695,225,169,169,169);
$Test->drawGraphArea(255,255,255,TRUE);
$Test->drawScale($DataSet->GetData(),$DataSet->GetDataDescription(),10,150,150,150,TRUE,0,2,TRUE);
$Test->drawGrid(10,TRUE,230,230,230,50);
$Test->setFontProperties("pChart.1.26e/Fonts/FreeSansBold.ttf",15);
$Test->drawTitle(50,22,"Clicks Per Month",50,50,50,585);
// Draw the 0 line
$Test->setFontProperties("pChart.1.26e/Fonts/FreeSans.ttf",6);
$Test->drawTreshold(0,143,55,72,TRUE,TRUE);
//Monthly Target
$Test->setFontProperties("pChart.1.26e/Fonts/FreeSansBold.ttf",10);
$Test->drawTreshold(40,143,55,72,TRUE,TRUE,4);
// Draw the bar graph
$Test->drawBarGraph($DataSet->GetData(),$DataSet->GetDataDescription(),TRUE);
// Finish the graph
$Test->setFontProperties("pChart.1.26e/Fonts/FreeSans.ttf",8);
// $Test->drawLegend(596,150,$DataSet->GetDataDescription(),255,255,255);
$Test->Render("generated/example12.png");
?><img src="generated/example12.png" />