I'm new to using pChart (and PHP), so perhaps there is a sound reason for the following:
I would like to wrap much of the class instances / graph creation method calls in a predefined function, but I obviously need to call that function and pass it arguments to help define the resulting graph.
e.g.:
Code:
function graphMulti(array $DataArray = NULL, $PlotMultiX = TRUE, $PlotMultiY = FALSE, $FormatX=pData::AXIS_FORMAT_TIME)
As you can see, I was planning on calling the AXIS_FORMAT_TIME class constant, only to find that it isn't defined as a class constant:
pData class definition:
Code:
/* Axis configuration */
define("AXIS_FORMAT_DEFAULT" , 680001);
define("AXIS_FORMAT_TIME" , 680002);
define("AXIS_FORMAT_DATE" , 680003);
define("AXIS_FORMAT_METRIC" , 680004);
define("AXIS_FORMAT_CURRENCY" , 680005);
define("AXIS_FORMAT_CUSTOM" , 680006);
Is there a particular reason why the above constant definitions in the pData class are not defined as:
Code:
/* Axis configuration */
const AXIS_FORMAT_DEFAULT = 680001;
const AXIS_FORMAT_TIME = 680002;
const AXIS_FORMAT_DATE = 680003;
const AXIS_FORMAT_METRIC = 680004;
const AXIS_FORMAT_CURRENCY = 680005;
const AXIS_FORMAT_CUSTOM = 680006;
Thanks!
-Joe