PHPGraphLibStacked Function Reference

PHPGraphLibStacked is an extension of the original PHPGraphLib that allows you to make stacked bar chars using the existing PHPGraphLib framework.

Below is the default form of the constructor:

Constructor

PHPGraphLibStacked( int $width, int $height, [string $filename] )
required
  • $graph=new PHPGraphLibStacked(600,400);
  • $graph=new PHPGraphLibStacked(600,400, "image.png");

PHPGraphLibStacked object constructor. $width and $height arguments are optional. Default width=400, height=300.

If you specify the optional filename argument, PHPGraphLib will not display to the screen, but instead create a .png file in the same directory as the script where PHPGraphLib is being called.

As with PHPGraphLib, addData() and createGraph() are also required functions.

PHPGraphLibStacked Functions

PHPGraphLibStacked inherits most of the same functions as PHPGraphLib, so you can reference the regular PHPGraphLib Function Reference when building a PHPGraphLibStacked graph. A few functions are not usable with PHPGraphLibStacked. Most notably you cannot make a line graph or display data points. Below is a list of functions not usable with PHPGraphLibStacked.

PHPGraphLibStacked Banned Functions

The following standard PHPGraphLib functions are not allowed when using the PHPGraphLib stacked extension.
  • setLine()
  • setDataPointSize()
  • setDataPoints()
  • setDataValues()