Location: PHPKode > scripts > Graph classes > graph-classes/test_pie.php
<?
require "Color.php";
require "Graph.php";
require "Piechart.php";

$white = new Color(255,255,255);
$blue = new Color(0,0,255);
$red = new Color(255,0,0);
$green = new Color(0,255,0);

$pie = new Piechart(100,$white);
$pie->addSegment(23,$white);
$pie->addSegment(120,$blue);
$pie->addSegment(60,$red);
$pie->addSegment(30,$green);
$pie->setFormat('gif');
$pie->printHTML();

?>
Return current item: Graph classes