Senin, 04 Januari 2010

PHP : BAR EXAMPLE



/*

The Bar chart generator by Ashish Kasturia (http://www.123ashish.com)
Copyright (C) 2003 Ashish Kasturia (ashish at 123ashish.com)


The Bar chart generator is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; either version 2
of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
USA.

*/




include("barmaker.php");

$b = new Bar();

//$b->SetBGJPEGImage("../model.jpg");
$b->SetTitleColor(245, 245, 255);
$b->SetTitle("Weekly Motorbike Sales");
$b->AddValue("Sunday", array(20, 55, 22));
$b->AddValue("Monday", array(25, 34, 33));
$b->AddValue("Tuesday", array(66, 24, 44));
$b->AddValue("Wednesday", array(70, 77, 10));
$b->AddValue("Thursday", array(56, 25, 56));
$b->AddValue("Friday", array(34, 0, 88));
$b->AddValue("Saturday", array(56, 78, 66));
$b->SetSeriesLabels(Array("Model 1", "Model 2", "Model 3"));

$b->spit("jpg");


?>

Tidak ada komentar: