|
|
Page 1 of 1
|
[ 3 posts ] |
|
Author |
Message |
aprakarsa
New pChart user
Joined: Mon Jan 09, 2012 3:56 am Posts: 2
|
Chart won't display
Hi, I downloaded the lastest pChart and install in my local host. The charts on example and the sandbox is display with no problem. But it won't display the chart after I copied the code from the sandbox and paste in my own .php file. I set the directory for classes ini right path. I put the file on pChart directory with examples, data, class and fonts directory etc. Please help. Thank you. And here is the code Code: <?php include("class/pData.class.php"); include("class/pDraw.class.php"); include("class/pImage.class.php");
$myData = new pData(); $myData->addPoints(array(VOID,2.06,3.12,2.15,1.08,1.02),"Serie1"); $myData->setSerieDescription("Serie1","Model"); $myData->setSerieOnAxis("Serie1",0);
$myData->addPoints(array(0.123456789,3.74,2.73,1.10,1.59,1.60),"Serie2"); $myData->setSerieDescription("Serie2","Sample"); $myData->setSerieOnAxis("Serie2",0);
$myData->addPoints(array("March","April","May","June","July","August","September","October"),"Absissa"); $myData->setAbscissa("Absissa");
$myData->setAxisPosition(0,AXIS_POSITION_LEFT); $myData->setAxisName(0,"Weeks"); $myData->setAxisUnit(0,"");
$myPicture = new pImage(700,500,$myData,TRUE); $Settings = array("R"=>38, "G"=>116, "B"=>183, "Dash"=>1, "DashR"=>58, "DashG"=>136, "DashB"=>203); $myPicture->drawFilledRectangle(0,0,700,500,$Settings);
$myPicture->drawRectangle(0,0,699,499,array("R"=>0,"G"=>0,"B"=>0));
$myPicture->setShadow(TRUE,array("X"=>1,"Y"=>1,"R"=>50,"G"=>50,"B"=>50,"Alpha"=>20));
$myPicture->setFontProperties(array("FontName"=>"fonts/Forgotte.ttf","FontSize"=>14)); $TextSettings = array("Align"=>TEXT_ALIGN_MIDDLEMIDDLE , "R"=>255, "G"=>255, "B"=>255); $myPicture->drawText(350,20,""DLT" Development Lead Time",$TextSettings);
$myPicture->setShadow(FALSE); $myPicture->setGraphArea(50,50,675,460); $myPicture->setFontProperties(array("R"=>0,"G"=>0,"B"=>0,"FontName"=>"fonts/pf_arma_five.ttf","FontSize"=>6));
$Settings = array("Pos"=>SCALE_POS_LEFTRIGHT , "Mode"=>SCALE_MODE_ADDALL_START0 , "LabelingMethod"=>LABELING_ALL , "GridR"=>255, "GridG"=>255, "GridB"=>255, "GridAlpha"=>50, "TickR"=>0, "TickG"=>0, "TickB"=>0, "TickAlpha"=>50, "LabelRotation"=>0, "CycleBackground"=>1, "DrawXLines"=>1, "DrawSubTicks"=>1, "SubTickR"=>255, "SubTickG"=>0, "SubTickB"=>0, "SubTickAlpha"=>50, "DrawYLines"=>ALL); $myPicture->drawScale($Settings);
$myPicture->setShadow(TRUE,array("X"=>1,"Y"=>1,"R"=>50,"G"=>50,"B"=>50,"Alpha"=>10));
$Config = array("DisplayValues"=>1, "AroundZero"=>1); $myPicture->drawBarChart($Config);
$Config = array("FontR"=>0, "FontG"=>0, "FontB"=>0, "FontName"=>"fonts/pf_arma_five.ttf", "FontSize"=>10, "Margin"=>6, "Alpha"=>30, "BoxSize"=>5, "Style"=>LEGEND_NOBORDER , "Mode"=>LEGEND_HORIZONTAL ); $myPicture->drawLegend(300,35,$Config);
$myPicture->stroke(); //$myPicture->Render("drawobjects1.png");
?>
|
Mon Jan 09, 2012 4:06 am |
|
|
patul
Regular pChart user
Joined: Fri Jun 24, 2011 5:13 pm Posts: 10
|
Re: Chart won't display
Change Code: $myPicture->drawText(350,20,""DLT" Development Lead Time",$TextSettings); To Code: $myPicture->drawText(350,20,"\"DLT\" Development Lead Time",$TextSettings);
|
Mon Jan 09, 2012 4:17 am |
|
|
aprakarsa
New pChart user
Joined: Mon Jan 09, 2012 3:56 am Posts: 2
|
Re: Chart won't display
Thank you. That solved the problem.
I should have turn on the "display_errors" on php.ini
Thanks.
|
Mon Jan 09, 2012 5:59 am |
|
|
|
Page 1 of 1
|
[ 3 posts ] |
|
Who is online |
Users browsing this forum: Bing [Bot] and 6 guests |
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot post attachments in this forum
|
|
|