In this example we again use the included data function method but this time we pass a request parameter through on the IMG tag. The data function will then produce the graph data based on the value of the request parameter.
This method has a variety of uses including displaying graph data dynamically based upon user form selection.
Here is the IMG tag which invokes the graphing software which dynamically creates the graph image at page load time.
Note the extra parameter 'customParam=8' on the IMG tag URL. This is used by the data function to create the data for the chart.
Here we tell the software to load the configuration options from the file configFile.txt and include the data function dataFunctionParams.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.