![]() |
Advanced Graphs and Charts for PHP |
Custom Data FunctionThis feature allows you to create your own custom PHP Data Script function. The function will be included at run time and used by the graph to acquire the data. This method provides enormous flexibility for the data acquisition process. All PHP Global variables ($_REQUEST, $_GET, $_POST, $_SESSION etc) are available to be used within the data function. A custom data script is specified via the parameter "datascript". For example if your data script is in a file datascript.php then your <IMG> tag would be:- The [RELATIVEpathTOdbinfoFILE] should be a relative filesystem file path to the data function file. This file path is relative to the location of the graph software and NOT the page which contains the IMG tag. The data script must be valid PHP code and should contain at least the following function:- where $lines is a string array containing the data parameters and values. The contents of the string array should be the format:-
where N represents the position of the data item in the series and M represents the series number. For example, for 3 series of data each containing 6 points the string array should contain:-
Note: The data script should under no circumstances write out any information via the print or echo functions. This would cause the production of the graph image to fail. Further information and examples can found in the Online Tutorials here » Also see:- |