| 
<?php
/**
 * Example script
 *
 */
 // initialize data
 $x = 'Sale';
 $y = "Years";
 
 $x_dataArray = array(
 "4091",
 "1311",
 "2491",
 "9091",
 "2091"
 );
 $y_dataArray = array(
 "1960",
 "1970",
 "1980",
 "1990",
 "2000"
 );
 
 // actual code using CodeToGraph Class (PHP 5 ONLY)
 try {
 require_once("DataToGraph.inc.php");
 $dataToGraph = new DataToGraph($x, $y, $x_dataArray, $y_dataArray);
 $imageCode = $dataToGraph->displayImage(800, 600);
 
 echo $imageCode;
 }
 catch (Exception $e) {
 echo $e->getMessage();
 }
 
 ?>
 |