PHP Lib Chart is an open source lightweight PHP-based graphing library that creates slick PHP graphs for incorporation into a website or application.
Use:
1 | include('php-lib-chart.php'); |
Define file to include. Please link to exactly location of the lib file
1 | $graph=new PHPGraphLib(480,320); |
This will define width and height of graph: Width: 480, height: 320
1 2 3 4 | $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); |
These array will define input data for graph.
You can input maximum of 3 data array. More than this will make graph difficult to see.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 | <?php /* Lib Chart PHP * Shared by BienThuy.Com * www.BienThuy.Com * wWw.HuyHoa.Com * Yahoo: huyhoa * Skype: admin.vtt * Facebook: http://www.facebook.com/tinhcaviet * Twitter: http://www.twitter.com/tinhcaviet * @ 2013. 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(); ?> |
This is php-lib-chart.php
Note: bieudo.php, bieudo1.php … much be put in the same location with php-lib-chart.php:
1 | include('php-lib-chart.php'); |
More demo and details at: http://demo.bienthuy.com/php/php-lib-chart/
You can download PHP Lib Chart here: http://demo.bienthuy.com/php/php-lib-chart/php-lib-chart
http://yyen.info/CAZzvwXnqy
Other Posts you may be interested in:
- Thành Nhà Hồ (Ho Citadel)
- Bình Thuận: Rộn Ràng Mùa Thanh Long Trái Vụ
- Hostgator flash sales September 2015 trước khi tăng giá
- Dự đoán giới tinh thai nhi qua tuổi bố mẹ và tháng thụ thai
- Niệm số trị bệnh, chữa bệnh theo tượng số chu dịch
- Fixed: Google sitemap error “Invalid tag value. This XML tag has an invalid value”
- Facebook Tutorial – “Posted Via” Anything
Last updated on September 9th, 2014 at 03:24 pm