/** * Draws markers on the canvas * @access private */ function _drawMarker() { if (($this->_marker) and ($this->_dataset)) { $this->_dataset->_reset(); while ($point = $this->_dataset->_next()) { $prevPoint = $this->_dataset->_nearby(-2); $nextPoint = $this->_dataset->_nearby(); if ((!is_object($this->_dataSelector)) or ($this->_dataSelector->_select($point))) { $point = $this->_getMarkerData($point, $nextPoint, $prevPoint, $i); if (is_array($point)) { $this->_marker->_drawMarker($point['MARKER_X'], $point['MARKER_Y'], $point); } } } } }
/** * Draws markers on the canvas * * @return void * @access private */ function _drawMarker() { if ($this->_marker && is_array($this->_dataset)) { $this->_canvas->startGroup(get_class($this) . '_marker'); $totals = $this->_getTotals(); $totals['WIDTH'] = $this->width() / ($this->_maximumX() + 2) / 2; $number = 0; $keys = array_keys($this->_dataset); foreach ($keys as $key) { $dataset =& $this->_dataset[$key]; $totals['MINIMUM_X'] = $dataset->minimumX(); $totals['MAXIMUM_X'] = $dataset->maximumX(); $totals['MINIMUM_Y'] = $dataset->minimumY(); $totals['MAXIMUM_Y'] = $dataset->maximumY(); $totals['NUMBER'] = $number++; $dataset->_reset(); while ($point = $dataset->_next()) { $prevPoint = $dataset->_nearby(-2); $nextPoint = $dataset->_nearby(); $x = $point['X']; $y = $point['Y']; if ((!is_object($this->_dataSelector) || $this->_dataSelector->_select($point)) && $point['Y'] !== null) { $point = $this->_getMarkerData($point, $nextPoint, $prevPoint, $totals); if (is_array($point)) { $this->_marker->_drawMarker($point['MARKER_X'], $point['MARKER_Y'], $point); } } if (!isset($totals['SUM_Y'])) { $totals['SUM_Y'] = array(); } if (isset($totals['SUM_Y'][$x])) { $totals['SUM_Y'][$x] += $y; } else { $totals['SUM_Y'][$x] = $y; } } } unset($keys); $this->_canvas->endGroup(); } }