Blog | Technical

phpChart examples

Today I`m looking into using phpChart to create some graphs for some websites. I thought I`d take some notes while I did this.

For example I have a Scottish Championship League table that would benefit from showing graphs.

To get started I download free phpChart Lite
The instructiones mentioned that it was easy to setup and to just do this:


define (` SCRIPTPATH `, `/phpChart/` ) .

However, if you need all instructions follow these steps:
Create a file "index.php" (or any fielname) and add the following:

require "conf.php" . // you need this also ?
$pc = new C_PhpChartX(array(array(11, 9, 5, 12, 14)),`basic_chart`) .
$pc->draw() .

This will give you this sample Chart 1 (click)

phpChart Lite only supports Line graphs so you can`t progress with the tutorial until you buy a licence.