Пример #1
0
 /**
  * Draw the marker on the canvas
  * @param int $x The X (horizontal) position (in pixels) of the marker on
  * the canvas
  * @param int $y The Y (vertical) position (in pixels) of the marker on the
  * canvas
  * @param array $values The values representing the data the marker 'points'
  * to
  * @access private
  */
 function _drawMarker($x, $y, $values = false)
 {
     $angle = pi() * rand(0, 360) / 180;
     $this->_deltaX = $this->_radius * cos($angle);
     $this->_deltaY = $this->_radius * sin($angle);
     parent::_drawMarker($x, $y, $values);
 }
Пример #2
0
 /**
  * Draw the marker on the canvas
  * @param int $x The X (horizontal) position (in pixels) of the marker on the canvas 
  * @param int $y The Y (vertical) position (in pixels) of the marker on the canvas 
  * @param array $values The values representing the data the marker "points" to 
  * @access private
  */
 function _drawMarker($x, $y, $values = false)
 {
     if (isset($values['LENGTH'])) {
         $this->_deltaX = - $values['AX'] * $this->_radius / $values['LENGTH'];
         $this->_deltaY = - $values['AY'] * $this->_radius / $values['LENGTH'];
     }
     
     if ((isset($values['NPY'])) and (isset($values['APY'])) and (isset($values['PPY'])) and ($values['NPY'] > $values['APY']) and ($values['PPY'] > $values['APY'])) {
         $this->_deltaX = - $this->_deltaX;
         $this->_deltaY = - $this->_deltaY;
     }
     parent::_drawMarker($x, $y, $values);
 }