本文整理匯總了PHP中Image_Graph_Plot::_getMarkerData方法的典型用法代碼示例。如果您正苦於以下問題:PHP Image_Graph_Plot::_getMarkerData方法的具體用法?PHP Image_Graph_Plot::_getMarkerData怎麽用?PHP Image_Graph_Plot::_getMarkerData使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類Image_Graph_Plot
的用法示例。
在下文中一共展示了Image_Graph_Plot::_getMarkerData方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: cos
/**
* Calculate marker point data
*
* @param array $point The point to calculate data for
* @param array $nextPoint The next point
* @param array $prevPoint The previous point
* @param array $totals The pre-calculated totals, if needed
* @return array An array containing marker point data
* @access private
*/
function _getMarkerData($point, $nextPoint, $prevPoint, &$totals)
{
$point = parent::_getMarkerData($point, $nextPoint, $prevPoint, $totals);
$y = $totals['CURRENT_Y'];
if ($this->_angleDirection < 0) {
$y = $totals['ALL_SUM_Y'] - $y;
}
$point['ANGLE'] = 360 * (($y + $point['Y'] / 2) / $totals['ALL_SUM_Y']) + $this->_startingAngle;
$totals['CURRENT_Y'] += $point['Y'];
$point['ANG_X'] = cos(deg2rad($point['ANGLE']));
$point['ANG_Y'] = sin(deg2rad($point['ANGLE']));
$point['AX'] = -10 * $point['ANG_X'];
$point['AY'] = -10 * $point['ANG_Y'];
if (isset($totals['ALL_SUM_Y']) && $totals['ALL_SUM_Y'] != 0) {
$point['PCT_MIN_Y'] = $point['PCT_MAX_Y'] = 100 * $point['Y'] / $totals['ALL_SUM_Y'];
}
$point['LENGTH'] = 10;
//$radius;
$x = $point['X'];
$explodeRadius = 0;
if (is_array($this->_explode) && isset($this->_explode[$x])) {
$explodeRadius = $this->_explode[$x];
} elseif (is_numeric($this->_explode)) {
$explodeRadius = $this->_explode;
}
$point['MARKER_X'] = $totals['CENTER_X'] + ($totals['RADIUS'] + $explodeRadius) * $point['ANG_X'];
$point['MARKER_Y'] = $totals['CENTER_Y'] + ($totals['RADIUS'] + $explodeRadius) * $point['ANG_Y'];
return $point;
}
示例2: cos
/**
* Calculate marker point data
*
* @param array $point The point to calculate data for
* @param array $nextPoint The next point
* @param array $prevPoint The previous point
* @param array $totals The pre-calculated totals, if needed
* @return array An array containing marker point data
* @access private
*/
function _getMarkerData($point, $nextPoint, $prevPoint, &$totals)
{
$point = parent::_getMarkerData($point, $nextPoint, $prevPoint, $totals);
$point['ANGLE'] = $this->_value2angle($point['Y']);
$point['ANG_X'] = cos(deg2rad($point['ANGLE']));
$point['ANG_Y'] = sin(deg2rad($point['ANGLE']));
$point['AX'] = -$point['ANG_X'];
$point['AY'] = -$point['ANG_Y'];
$point['LENGTH'] = 2.5;
//$radius;
$point['MARKER_X'] = $totals['CENTER_X'] + $totals['ODO_RADIUS'] * $point['ANG_X'];
$point['MARKER_Y'] = $totals['CENTER_Y'] + $totals['ODO_RADIUS'] * $point['ANG_Y'];
return $point;
}