include("statics/pChart/pData.class"); include("statics/pChart/pChart.class"); // Dataset definition $DataSet = new pData; $DataSet->AddPoint($num,"Serie1");//反馈人数 $DataSet->AddPoint($feed,"Serie2");//反馈量 $DataSet->AddPoint($tim,"Serie3");//x轴时间 $DataSet->AddSerie("Serie1"); $DataSet->AddSerie("Serie2"); $DataSet->SetAbsciseLabelSerie("Serie3");// Initialise the graph $Test = new pChart(1050,345); $Test->setFontProperties("statics/Fonts/tahoma.ttf",8); $Test->setGraphArea(85,30,975,300); $Test->drawFilledRoundedRectangle(7,7,1040,335,5,240,240,240); $Test->drawRoundedRectangle(5,5,695,225,5,230,230,230); $Test->drawGraphArea(255,255,255,TRUE); $Test->drawScale($DataSet->GetData(),$DataSet->GetDataDescription(),SCALE_NORMAL,150,150,150,TRUE,0,2); $Test->drawGrid(4,TRUE,230,230,230,50); $Test->setFontProperties("statics/Fonts/tahoma.ttf",6); $Test->drawTreshold(0,143,55,72,TRUE,TRUE); $Test->drawLineGraph($DataSet->GetData(),$DataSet->GetDataDescription()); $Test->drawPlotGraph($DataSet->GetData(),$DataSet->GetDataDescription(),3,2,255,255,255); $imageFile = "uploadfile/zhexian/1.png"; $Test->Render($imageFile); echo '<img src="'.$imageFile.'">';
pchart类库下载(地址:http://pchart.sourceforge.net/documentation.php)