ChartLogix PHP Charting Documentation |
|
ChartLogix is designed to be as easy to use as possible, with minimal installation requirements
and a set of easy functions to create, style and render high-quality graphs. |
|
|
Installation |
|
The ChartLogix library is completely self-contained in one PHP file (chartlogix.inc.php). |
|
See the Installation guide for more details |
|
|
Getting Started |
|
The simplest way to use ChartLogix is to make a PHP script which will output the image as a JPG or PNG.
This PHP script will not output any HTML, and will be used just like an image on any HTML page, in the SRC attribute in an image tag. |
|
Create a graph script (which will be an img src), for example - mychart.php: |
|
<? include( 'chartlogix.inc.php' ); $chart = new BarChart(); $chart->addColumns( array('Jan','Feb','Mar','Apr','May') ); $chart->doBarSeries( 'Sales', 'FFCC00' ); $chart->addData( 'Jan', 191 ); $chart->addData( 'Feb', 217 ); $chart->addData( 'Mar', 178 ); $chart->addData( 'Apr', 263 ); $chart->addData( 'May', 321 ); $chart->drawPNG( 500, 400 ); ?>
|
|
| | | |
|
Then put an img tag in your HTML refering to the graph script: |
|
<html><body><img src="mychart.php" width="500" height="400" /></body></html>
|
|
|
Drawing Pie Charts |
|
See how to make Pie Charts |
|
|
Drawing Bar Graphs & Line Graphs |
|
See how to make Bar Graphs |
|