<?php
/*
 *  make the 2d groupcolumn chart
 */ 
 
// include class file
include('plchart.php'); 
   
// set the array of source data
$data = array(
			  "2000" => array("Quarter 1" => 13, "Quarter 2" => 15, "Quarter 3" => 19, "Quarter 4" => 17),
			  "2001" => array("Quarter 1" => 23, "Quarter 2" => 24, "Quarter 3" => 26, "Quarter 4" => 25),
			  "2002" => array("Quarter 1" => 16, "Quarter 2" => 18, "Quarter 3" => 18, "Quarter 4" => 21),
			  "2003" => array("Quarter 1" => 14, "Quarter 2" => 16, "Quarter 3" => 12, "Quarter 4" => 23)
			 );
   
// set chart object
$chart = new plchart(); 
   
// set bgcolor
$chart->setbgcolor(255,255,255);    

// set string for title
$title = <<< string
PHP Light Chart v0.060915    2D GroupColumn
string;

// set chartdata
$chart->setchartdata("groupcolumn", 0, 800, 600, 100, $data, '');
    
// set title
$chart->settitle($title, 10, 0, 100, 450, 'fonts/arial.ttf', 0, 0, 250);

// set description
$chart->setdesc(500, 0, 100, 300, 0, 10, 0, 'fonts/arial.ttf', 0, 0, 0);
     
// set graphics
$chart->setgraphics(0, 0, 500, 400, 20, 0.2);
    
// output chart
$chart->outputchart();    

// destroy object
unset($chart);
?>
