PHP Classes

File: test_pie.php

Recommend this page to a friend!
  Classes of Eugene Panin   Graph   test_pie.php   Download  
File: test_pie.php
Role: Example script
Content type: text/plain
Description: Test script for Piechart
Class: Graph
Author: By
Last change:
Date: 23 years ago
Size: 401 bytes
 

Contents

Class file image Download
<?
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();

?>