PHP Lib chart - Simple PHP chart drawing library - PHP Charts & Graphs
PHP Lib Chart Demos - Bien Thuy Demo Pages
wWw.BienThuy.Com
wWw.BienThuy.Com
/* Lib Chart PHP * Shared by BienThuy.Com * www.BienThuy.Com * Facebook: http://www.facebook.com/bienthuywebsite * Twitter: http://www.twitter.com/bienthuywebsite * @ 2024. All Rights Reserved. * */ include('php-lib-chart.php'); $graph=new PHPGraphLib(480,320); $data = array(12124, 5535, 43373, 22223, 60432, 23332, 15544, 24523, 32778, 38878, 28787, 33243, 34832); $graph->addData($data); $graph->setTitle('PHP Lib Chart Demo by BienThuy.Com '); $graph->setGradient('green', 'blue'); $graph->createGraph();Result Graph Example 0:
/* Lib Chart PHP * Shared by BienThuy.Com * www.BienThuy.Com * Facebook: http://www.facebook.com/bienthuywebsite * Twitter: http://www.twitter.com/bienthuywebsite * @ 2024. All Rights Reserved. * */ include('php-lib-chart.php'); $graph = new PHPGraphLib(650,200); $data = array("1" => .0032, "2" => .0028, "3" => .0021, "4" => .0033, "5" => .0034, "6" => .0031, "7" => .0036, "8" => .0027, "9" => .0024, "10" => .0021, "11" => .0026, "12" => .0024, "13" => .0036, "14" => .0028, "15" => .0025); $graph->addData($data); $graph->setTitle('PHP Lib Chart Demo by BienThuy.Com '); $graph->setBars(false); $graph->setLine(true); $graph->setDataPoints(true); $graph->setDataPointColor('maroon'); $graph->setDataValues(true); $graph->setDataValueColor('maroon'); $graph->setGoalLine(.0025); $graph->setGoalLineColor('red'); $graph->createGraph();
Result Graph Example 1:
/* Lib Chart PHP * Shared by BienThuy.Com * www.BienThuy.Com * Facebook: http://www.facebook.com/bienthuywebsite * Twitter: http://www.twitter.com/bienthuywebsite * @ 2024. All Rights Reserved. * */ include('php-lib-chart.php'); $graph=new PHPGraphLib(480,320); $data = array("Jan"=>-1324, "Feb"=>-1200, "Mar"=>-100, "Apr"=>-1925, "May"=>-1444, "Jun"=>-957, "Jul"=>-364, "Aug"=>-221, "Sep"=>-1300, "Oct"=>-848, "Nov"=>-719, "Dec"=>-114); $graph->addData($data); $graph->setTitle('PHP Lib Chart Demo by BienThuy.Com '); $graph->setGradient('green', 'blue'); $graph->createGraph();
Result Graph Example 2:
/* /* Lib Chart PHP * Shared by BienThuy.Com * www.BienThuy.Com * Facebook: http://www.facebook.com/bienthuywebsite * Twitter: http://www.twitter.com/bienthuywebsite * @ 2024. All Rights Reserved. * */ include('php-lib-chart.php'); $graph=new PHPGraphLib(480,320); $data=array("Jan" => 1145, "Feb" => 1202, "Mar" => 1523, "Apr" => 1437, "May" => 969, "Jun" => 999, "Jul" => 1188, "Aug" => 1188, "Sep" => 888, "Oct" => 1178, "Nov" => 1618, "Dec" => 1358); $data2=array("Jan" => 945, "Feb" => 1002, "Mar" => 1723, "Apr" => 737, "May" => 1369, "Jun" => 1599, "Jul" => 1488, "Aug" => 1688, "Sep" => 1218, "Oct" => 1368, "Nov" => 1259, "Dec" => 1412); $data3=array("Jan" => 645, "Feb" => 982, "Mar" => 1123, "Apr" => 767, "May" => 969, "Jun" => 1299, "Jul" => 1188, "Aug" => 1088, "Sep" => 1518, "Oct" => 1668, "Nov" => 1459, "Dec" => 1112); $graph->addData($data, $data2, $data3); $graph->setBarColor('blue', 'green', 'red'); $graph->setTitle('PHP Lib Chart Demo by BienThuy.Com'); $graph->setupYAxis(12, 'blue'); $graph->setupXAxis(20); $graph->setGrid(false); $graph->setLegend(true); $graph->setTitleLocation('left'); $graph->setTitleColor('blue'); $graph->setLegendOutlineColor('white'); $ngay1 = date('Y')-2; $ngay3 = date('Y')-1; $graph->setLegendTitle(''.$ngay1.'', ''.$ngay3.'', ''.date('Y').''); $graph->setXValuesHorizontal(true); $graph->createGraph();
Result Graph Example 3:
/* Lib Chart PHP * Shared by BienThuy.Com * www.BienThuy.Com * Facebook: http://www.facebook.com/bienthuywebsite * Twitter: http://www.twitter.com/bienthuywebsite * @ 2024. All Rights Reserved. * */ include('php-lib-chart.php'); include('php-lib-chart-pie.php'); $graph = new PHPGraphLibPie(400, 200); $data = array("GOOGLE.COM" => 6.3, "BIENTHUY.COM" => 4.5,"MSN.COM" => 2.8, "LIVE.COM" => 2.7, "BIENTHUY.NET" => 5.4); $graph->addData($data); $graph->setTitle('PHP Lib Chart by BIENTHUY.COM - Example 4'); $graph->setLabelTextColor('50,50,50'); $graph->setLegendTextColor('50,50,50'); $graph->createGraph();
Result Graph Example 4:
/* Lib Chart PHP * Shared by BienThuy.Com * www.BienThuy.Com * Facebook: http://www.facebook.com/bienthuywebsite * Twitter: http://www.twitter.com/bienthuywebsite * @ 2024. All Rights Reserved. * */ include('php-lib-chart.php'); include('php-lib-chart-stacked.php'); $graph = new PHPGraphLibStacked(500,300); $popularity = array('LIVE.COM'=>80, 'BIENTHUY.COM'=>35, 'GOOGLE.COM'=>69); $cost = array('LIVE.COM'=>60, 'BIENTHUY.COM'=>30, 'GOOGLE.COM'=>90); $speed = array('LIVE.COM'=>50,'BIENTHUY.COM'=>50,'GOOGLE.COM'=>80); $graph->addData($popularity, $cost, $speed); $graph->setTitle('PHP Lib Chart by BIENTHUY.COM - Example 5'); $graph->setTitleLocation('left'); $graph->setXValuesHorizontal(TRUE); $graph->setTextColor('blue'); $graph->setBarColor('#0066CC', '#669999', '#66CCCC'); $graph->setLegend(TRUE); $graph->setLegendTitle('Firefox', 'Chrome', 'IE'); $graph->createGraph();
Result Graph Example 5:
/* Lib Chart PHP * Shared by BienThuy.Com * www.BienThuy.Com * Facebook: http://www.facebook.com/bienthuywebsite * Twitter: http://www.twitter.com/bienthuywebsite * @ 2024. All Rights Reserved. * */ include('php-lib-chart.php'); $graph = new PHPGraphLib(450,300); $data = array("Jan" => -10.1, "Feb" => -3.6, "Mar" => 11.0, "Apr" => 30.7, "May" => 48.6, "Jun" => 59.8, "Jul" => 62.5, "Aug" => 56.8, "Sep" => 45.5, "Oct" => 25.1, "Nov" => 2.7, "Dec" => -6.5); $graph->addData($data); $graph->setBarColor('navy'); $graph->setupXAxis(20, 'blue'); $graph->setTitle('PHP Lib Chart by BienThuy.Com'); $graph->setTitleColor('blue'); $graph->setGridColor('153,204,255'); $graph->setDataValues(true); $graph->setDataValueColor('navy'); $graph->setDataFormat('degrees'); $graph->setGoalLine('32'); $graph->setGoalLineColor('red'); $graph->createGraph();
Result Graph Example 6:
/* Lib Chart PHP * Shared by BienThuy.Com * www.BienThuy.Com * Facebook: http://www.facebook.com/bienthuywebsite * Twitter: http://www.twitter.com/bienthuywebsite * @ 2024. All Rights Reserved. * */ include('php-lib-chart.php'); $graph = new PHPGraphLib(350,280); $data = array("Roger"=>145, "Ralph"=>102, "Rhonda"=>123, "Ronaldo"=>137, "Rosario"=>149, "Robin"=>99, "Robert"=>88, "Rustof"=>111); $graph->setBackgroundColor("white"); $graph->addData($data); $graph->setBarColor('255,255,204'); $graph->setTitle('PHP Lib Chart by BienThuy.Com - Example 7'); $graph->setTitleColor('green'); $graph->setupYAxis(12, 'green'); $graph->setupXAxis(20, 'green'); $graph->setGrid(true); $graph->setGradient('silver', 'blue'); $graph->setBarOutlineColor('white'); $graph->setTextColor('white'); $graph->setDataPoints(true); $graph->setDataPointColor('green'); $graph->setLine(true); $graph->setLineColor('green'); $graph->createGraph();
Result Graph Example 7: