 |
|

Code (PHP)
<?php
//ผมสร้าง textfield ไว้ 5 อัน คือ A,B,C,D,E
// Standard inclusions
include("pChart/pData.class");
include("pChart/pChart.class");
// Dataset definition
$DataSet = new pData;
$DataSet->AddPoint(array($A,$B,$C,$D,$E),"Serie1"); ////// ติดปัญหาคือ มันไม่สามารถสร้างการด้วยตัวแปรที่ผมกรอกมาได้อะ ครับ
$DataSet->AddPoint(array("Jan","Feb","Mar","Apr","May"),"Serie2");
$DataSet->AddAllSeries();
$DataSet->SetAbsciseLabelSerie("Serie2");
// Initialise the graph
$Test = new pChart(380,200);
$Test->drawFilledRoundedRectangle(7,7,373,193,5,240,240,240);
$Test->drawRoundedRectangle(5,5,375,195,5,230,230,230);
// Draw the pie chart
$Test->setFontProperties("Fonts/tahoma.ttf",8);
$Test->drawPieGraph($DataSet->GetData(),$DataSet->GetDataDescription(),150,90,110,PIE_PERCENTAGE,TRUE,50,20,5);
$Test->drawPieLegend(310,15,$DataSet->GetData(),$DataSet->GetDataDescription(),250,250,250);
$Test->Stroke("example10.png");
//$Graph->Render("example10.png");
?>
มันขึ้น error เกี่ยวกับ class ในการสร้างกราฟ ครับ
ขอบคุณครับ
Tag : PHP
|
|
 |
 |
 |
 |
Date :
2012-01-20 10:23:45 |
By :
davcpe |
View :
1102 |
Reply :
1 |
|
 |
 |
 |
 |
|
|
|
 |