<?php

// Set HTTP header
header('Content-type: image/png');

// Require class
require 'class.piechart.php';

// Array of data - probably generated from a database in most cases
$data = array(122453119);

// Colours need to correspond with the above data, i.e. colour/number must be in the same array order
// Therefore, 5 colours in this case as we have 5 pieces of data to render
// Array taken in R,G,B format
$colours = array(
            
$blue1 = array(170177213),
            
$blue2 = array(103118191),
            
$blue3 = array(6691223),
            
$blue4 = array(141158246),
            
$blue5 = array(214218239)
                );

// Border colour (again, RGB)
$border = array(7788146);

// Background colour; white
$bg = array(255255255);

// Instantiate the class with our data
$pie = new piechart($data$colours$border$bg200200);
// Render the pie chart
$pie->render();

?>