PHP library to draw Column, Bar, Line and Pie Charts
Phpopenchart was based on Libchart and allows you to create charts using PHP. It's specially useful when you need to create charts on the server-side and so you can't use a front-end library such as Highcharts.
use Phpopenchart\Chart\Column; $chart = new Column([ 'chart' => [ 'width' => 1000, 'height' => 300, ], 'title' => [ 'text' => 'Values' ], 'dataset' => [ 'series' => ['Product A', 'Product B', 'Product C'], 'labels' => ['Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul'], 'data' => [ [3296, 4852, 2010, 6004, 5014, 7695], [2036, 1816, 687, 1025, 3074, 3651], [123, 984, 102, 707, 853, 696], ] ] ]); $chart->render();
There's an extensive documentation here with all the available options, methods and datasets.
Require the package in your
composer.json file and update composer, using the following data:
In a forseable future
- Improve demo/examples section (display comparison between libchart and phpopenchart)
- Make this easily integrated with Laravel
Phpopenchart is distributed under the terms of the GNU GPL v3. This includes everything in the source code distribution except where otherwise stated.
The following third party software is distributed with Phpopenchart and is provided under other licenses and/or has source available from other locations.
Files in the fonts directory are distributed under their own licence, which is located under the fonts directory.