JPowered.com

Advanced Graphs and Charts for PHP

Included Data Function

The graphing software will allow you to write your own data functions which are then dynamically included at runtime. As with the external data script method this allows data to be acquired in real time from any source including databases, spreadsheets etc.

An advantage of this method is that all $_REQUEST and $_SESSION variables are available for use within the function at runtime. This allows data to be dynamically selected based upon data stored by your application in the session or sent on the request object.

 

Here is the IMG tag which invokes the graphing software which dynamically creates the graph image at page load time.

Here we tell the software to load the configuration options from the file configFile.txt and include the data function dataFunction.php (code below)

Note: if a closing PHP tag (?>)is added at the end of the data function file then it is vital that no characters appear after that tag. If even a space character exists then the graphing image will not be produced. It is recommend that the closing PHP tag is omitted.

Note: the URLs supplied for both the configuration and data are relative URLs. The URLs are relative to the location of the graphing software and NOT this page.

If the graph does not display then see the Troubleshooting guide for details on how to resolve the problem.

 

Package Index

Documentation

Troubleshooting Guide

Support

Examples

Basic Chart Styles

Bar Graphs

Cylinder Charts

Combination Charts