The graphing software has been designed so that most of the properties can be set and tailored to a particular implementaiton. The parameters are optional and if not set then default values will be used.
Parameters can be set in two ways:-
The the graph demos in the ./example directory all set the properties via this method. The property object is supplied as the 4th paramter to the JpGraph method:-
For the full range of properties that can be set please see Parameter Reference
Upon startup the graph software will look for the property object and use any values which have been set.
The graph samples in in the /examples directory all use this method to supply the property values.
The second method for setting parameters allow all the options to be placed in a single file. The 'Property Filename' is then supplied to the graph software. Upon startup the graphing software will issue a URL request to read in the property file and set the options from this file.
It is important to note that pages that contain a graph configured in this manner must be served up via a web server, if not the request for the file will fail. i.e. such a page will not work from the local file system.
To set a property filename set the following in the 4th parameter of the JpGraph method:-
Here is an example of the contents of a property file:-
The URL to the property file does not have to be a physical file, it can be set to a server side script which will allow parameter values to be generated 'on the fly'