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
Digging with pChart
Basic Examples
Line graph
Cubic curve graph
Bar Graph
Stacked Bar Graph
Overlay Bar graph
Line + Area
Limits graph
Filled line graph
Filled cubic graph
Radar graph
Basic Pie graph
Exploded Pie graph
3D Pie graph
Scatter charts
Advanced Examples
Example #8 - Creating a filled radar graph

This example shows how to create a simple filled radar graph containing two data series. Data are manualy set using the AddPoint() method of the pData class.

The first step consist in calling the drawRadarAxis() function to prepare the graph area by drawing the Axis. You can specify the MaxValue or keep the automatic scaling mode.

The first step consist in calling the drawFilledRadar() function to draw the radar graph over the Axis layer with a transparency of 60%. ( default is 50% )

Running this script will create a example8.png file in the current directory.

Source code :
  // Standard inclusions   

  // Dataset definition 
  $DataSet = new pData;

  $DataSet->SetSerieName("Tested computer","Serie2");

  // Initialise the graph
  $Test = new pChart(400,400);

  // Draw the radar graph

  // Finish the graph
  $Test->drawTitle(0,22,"Example 8",50,50,50,400);
If you want to send the picture directly in a browser, replace the Render() command by Stroke().

Last updated on 05/27/2008