แก้ไขปรับปรุงโดย Mindphp.com
ตัวอย่างการใช้งานงาน
โค้ด: เลือกทั้งหมด
<?php
require("piegraph.class.php");
// class call with the width, height & data
$pie = new PieGraph(200, 100, array(231,122,32,54));
// colors for the data
$pie->setColors(array("#ff0000","#ff8800","#0022ff","#33ff33"));
// legends for the data
$pie->setLegends(array("Internet Explorer","Mozilla Firefox","Opera","Netscape"));
// Display creation time of the graph
$pie->DisplayCreationTime();
// Height of the pie 3d effect
$pie->set3dHeight(15);
// Display the graph
$pie->display();
?>