/** * 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' * * @param int $x The X value to add * @param int $y The Y value to add, can be omited * @param var $ID The ID of the point */ function addPoint($x, $y = false, $ID = false) { parent::addPoint($x, $y, $ID); if (is_array($ID)) { $data = $ID; $ID = isset($data['id']) ? $data['id'] : false; } else { $data = false; } $this->_data[] = array('X' => $x, 'Y' => $y, 'ID' => $ID, 'data' => $data); if (!is_numeric($x)) { $this->_maximumX = count($this->_data); } }
/** * Add a point to the dataset * @param int $x The X value to add * @param int $y The Y value to add, can be omited * @param var $ID The ID of the point */ function addPoint($x, $y = false, $ID = false) { parent::addPoint($x, $y, $ID); $this->_data[] = array ('X' => $x, 'Y' => $y, 'ID' => $ID); }