SetScale("textlin"); // Add a drop shadow $graph->SetShadow(); // Adjust the margin a bit to make more room for titles $graph->img->SetMargin(40,30,20,40); // Create a bar pot $bplot = new BarPlot($datay); // Specify X-labels $graph->xaxis->SetTickLabels(array("ปริญญาตรี","ปริญญาโท","ปริญญาเอก")); // Adjust fill color $bplot->SetFillColor('orange'); $bplot->value->Show(); $graph->Add($bplot); // Setup the titles $graph->title->Set("กราฟแสดงระดับการศึกษาของบุคลากรทุกสายงานทั้งหมด"); //$graph->xaxis->title->Set("วุฒิการศึกษา"); $graph->yaxis->title->Set("จำนวน(คน)"); $graph->title->SetFont(FF_COURIER,FS_BOLD); $graph->xaxis->SetFont(FF_TAHOMA,FS_NORMAL); $graph->yaxis->title->SetFont(FF_COURIER,FS_BOLD); $graph->xaxis->title->SetFont(FF_COURIER,FS_BOLD); // Display the graph $graph->Stroke("graduate.png"); echo "


"; /*-----------------------------------personal type-------------------------------------------*/ $datay=array($rs4['num4'],$rs5['num5'],$rs6['num6'],$rs7['num7'],$rs8['num8']); // Create the graph. These two calls are always required $graph = new Graph(600,300,"auto"); $graph->SetScale("textlin"); // Add a drop shadow $graph->SetShadow(); // Adjust the margin a bit to make more room for titles $graph->img->SetMargin(40,30,20,40); // Create a bar pot $bplot = new BarPlot($datay); // Specify X-labels $graph->xaxis->SetTickLabels(array("ทันตแพทย์","เภสัชกร","วิทยาจารย์","พยาบาลวิชาชีพ","สายสนับสนุน")); // Adjust fill color $bplot->SetFillColor('orange'); $bplot->value->Show(); $graph->Add($bplot); // Setup the titles $graph->title->Set("กราฟแสดงบุคลากรตามประเภทสายงาน"); //$graph->xaxis->title->Set("ประเภทสายงาน"); $graph->yaxis->title->Set("จำนวน(คน)"); $graph->title->SetFont(FF_COURIER,FS_BOLD); $graph->xaxis->SetFont(FF_TAHOMA,FS_NORMAL); $graph->yaxis->title->SetFont(FF_COURIER,FS_BOLD); $graph->xaxis->title->SetFont(FF_COURIER,FS_BOLD); // Display the graph $graph->Stroke("personalType.png"); echo "


"; /*-------------------------------------persoanl status-----------------------------------------*/ $datay=array($rs9['num9'],$rs10['num10'],$rs11['num11']); // Create the graph. These two calls are always required $graph = new Graph(600,300,"auto"); $graph->SetScale("textlin"); // Add a drop shadow $graph->SetShadow(); // Adjust the margin a bit to make more room for titles $graph->img->SetMargin(40,30,20,40); // Create a bar pot $bplot = new BarPlot($datay); // Specify X-labels $graph->xaxis->SetTickLabels(array("ข้าราชการ","ลูกจ้างประจำ","ลูกจ้างชั่วคราว(เหมาจ่าย)")); // Adjust fill color $bplot->SetFillColor('orange'); $bplot->value->Show(); $graph->Add($bplot); // Setup the titles $graph->title->Set("กราฟแสดงบุคลากรตามสถานะ"); //$graph->xaxis->title->Set("สถานะบุคลากร"); $graph->yaxis->title->Set("จำนวน(คน)"); $graph->title->SetFont(FF_COURIER,FS_BOLD); $graph->xaxis->SetFont(FF_TAHOMA,FS_NORMAL); $graph->yaxis->title->SetFont(FF_COURIER,FS_BOLD); $graph->xaxis->title->SetFont(FF_COURIER,FS_BOLD); // Display the graph $graph->Stroke("personalStatus.png"); echo ""; /*------------------------------------------------------------------------------------------------*/ ?>