Last release: 1.27d
a PHP Class to build Charts
pChart 2.x is born, you can start moving your script to this new version. The new website is at
Overview  |  Screenshots  |  Download  |  Add-ons  |  Demonstration  |  Support  |  :: Documentation ::
Documentation Contents
Class definition
Using pChart with MySQL
Playing with colors
Setting X labels
Series are drawn black?
Debugging charts
Call to undefined function
Digging with pChart
Basic Examples
Advanced Examples
Call to undefined function imagecreatetruecolor()

This is probably the first error message that you can see while using pChart. Many PHP installations are made without adding GD support. If GD isn't linked in your PHP setup you'll have this error message :
C:\Web\pChart>php -q Example1.php
PHP Fatal error:  Call to undefined function imagecreatetruecolor() in C:\pChart.class on line 134
To activate GD support on windows systems edit your php.ini file (located in your php installation) and uncomment this line :
;extension=php_gd2.dll removing the ; character. If you are running a linux installation of PHP, you must recompile it including GD support, you'll also need to include the FreeType support. We invite you to read the PHP manual.

How to check your PHP setup

To see the configuration of PHP on your web server, make a file named test.php in the web directory root and write the following in it :
..then open this page in a web browser and locate the GD part :

GD Supportenabled
GD Versionbundled (2.0.34 compatible)
FreeType Supportenabled
FreeType Linkagewith freetype
FreeType Version2.1.9

pChart needs that both GD and FreeType support are enabled.

Last updated on 08/12/2008