Image_Graph_Dataset_Trivial Image_Graph_Dataset_Trivial(
[array
$dataArray = false])
|
|
Image_Graph_Dataset_Trivial [Constructor]
Pass an associated array ($data[$x] = $y) to the constructor for easy data addition. Alternatively (if multiple entries with same x value is required) pass an array with (x, y) values: $data[$id] = array('x' => $x, 'y' => $y);
NB! If passing the 1st type array at this point, the x-values will also be used for ID tags, i.e. when using Image_Graph_Fill_Array. In the 2nd type the key/index of the "outermost" array will be the id tag (i.e. $id in the example)
Parameters:
void addPoint(
int
$x, [int
$y = false], [var
$ID = false])
|
|
Add a point to the dataset
$ID can contain either the ID of the point, i.e. 'DK', 123, 'George', etc. or it can contain values used for creation of the HTML image map. This is achieved using is an an associated array with the following values:
'url' The URL to create the link to
'alt' [optional] The alt text on the link
'target' [optional] The target of the link
'htmltags' [optional] An associated array with html tags (tag as key), fx. 'onMouseOver' => 'history.go(-1);', 'id' => 'thelink'
Overridden in child classes as:
- Image_Graph_Dataset_Sequential::addPoint()
- Add a point to the dataset
Overrides
Image_Graph_Dataset::addPoint() (Add a point to the dataset)
Parameters: