GChart -- A PHP Library for Drawing Charts

Line Chart with Axises

<?php
define ('GChart_DIR',dirname(__FILE__).'/gchart');
require_once (GChart_DIR.'/GChart.php');

$line=new GChart_Line(300,150);
$line->set_encoding(TEXT_ENCODING_SCALING);
$x_axis=new GChart_Axis(GChart_BOTTOM_X_AXIS,array('Jan','Feb','Mar','Apr','May','Jun'));
$y_axis=new GChart_Axis(GChart_LEFT_Y_AXIS);
$y_axis->set_boundry(0,40);
$s1=new GChart_DataSeries(array(10,14,21,28,30,36),'Temperature');
$s1->set_scaling(0,40);
$line->add($s1);
$line->add_axis($x_axis);
$line->add_axis($y_axis);
?>
<img src="<?php echo $line->get_image_string(); ?>" />