summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/axis/date.php6
-rw-r--r--src/axis/labeled.php3
-rw-r--r--src/axis/logarithmic.php3
-rw-r--r--src/axis/numeric.php3
-rw-r--r--src/charts/line.php13
-rw-r--r--src/charts/pie.php13
-rw-r--r--src/charts/radar.php17
-rw-r--r--src/data_container/base.php14
-rw-r--r--src/data_container/single.php4
-rw-r--r--src/datasets/array.php2
-rw-r--r--src/datasets/average.php2
-rw-r--r--src/datasets/base.php1
-rw-r--r--src/driver/flash.php24
-rw-r--r--src/driver/gd.php5
-rw-r--r--src/driver/svg.php7
-rw-r--r--src/driver/verbose.php26
-rw-r--r--src/element/axis.php2
-rw-r--r--src/element/background.php9
-rw-r--r--src/element/legend.php11
-rw-r--r--src/interfaces/axis_label_renderer.php21
-rw-r--r--src/interfaces/dataset_property.php11
-rw-r--r--src/interfaces/driver.php15
-rw-r--r--src/interfaces/element.php12
-rw-r--r--src/interfaces/radar_renderer.php2
-rw-r--r--src/interfaces/renderer.php9
-rw-r--r--src/math/boundings.php2
-rw-r--r--src/math/polynom.php15
-rw-r--r--src/math/transformation.php2
-rw-r--r--src/math/translation.php10
-rw-r--r--src/options/chart.php7
-rw-r--r--src/options/font.php5
-rw-r--r--src/renderer/2d.php21
-rw-r--r--src/renderer/3d.php13
-rw-r--r--src/renderer/axis_label_radar.php1
-rw-r--r--src/structs/context.php5
-rw-r--r--src/structs/step.php2
36 files changed, 239 insertions, 79 deletions
diff --git a/src/axis/date.php b/src/axis/date.php
index 42a3bca..96e8b58 100644
--- a/src/axis/date.php
+++ b/src/axis/date.php
@@ -174,7 +174,7 @@ class ezcGraphChartElementDateAxis extends ezcGraphChartElementAxis
/**
* Add data for this axis
*
- * @param mixed $value Value which will be displayed on this axis
+ * @param array $values Value which will be displayed on this axis
* @return void
*/
public function addData( array $values )
@@ -429,7 +429,6 @@ class ezcGraphChartElementDateAxis extends ezcGraphChartElementAxis
/**
* Get coordinate for a dedicated value on the chart
*
- * @param ezcGraphBounding $boundings
* @param float $value Value to determine position for
* @return float Position on chart
*/
@@ -499,7 +498,8 @@ class ezcGraphChartElementDateAxis extends ezcGraphChartElementAxis
/**
* Get label for timestamp
*
- * @param int $time
+ * @param int $time
+ * @param int $step
* @return string
*/
protected function getLabelFromTimestamp( $time, $step )
diff --git a/src/axis/labeled.php b/src/axis/labeled.php
index d48b3f3..974f29f 100644
--- a/src/axis/labeled.php
+++ b/src/axis/labeled.php
@@ -127,7 +127,7 @@ class ezcGraphChartElementLabeledAxis extends ezcGraphChartElementAxis
/**
* Add data for this axis
*
- * @param mixed $value Value which will be displayed on this axis
+ * @param array $values Value which will be displayed on this axis
* @return void
*/
public function addData( array $values )
@@ -332,7 +332,6 @@ class ezcGraphChartElementLabeledAxis extends ezcGraphChartElementAxis
/**
* Get coordinate for a dedicated value on the chart
*
- * @param ezcGraphBounding $boundings
* @param string $value Value to determine position for
* @return float Position on chart
*/
diff --git a/src/axis/logarithmic.php b/src/axis/logarithmic.php
index 9079200..2b1b226 100644
--- a/src/axis/logarithmic.php
+++ b/src/axis/logarithmic.php
@@ -108,7 +108,7 @@ class ezcGraphChartElementLogarithmicalAxis extends ezcGraphChartElementAxis
/**
* Add data for this axis
*
- * @param mixed $value Value which will be displayed on this axis
+ * @param array $values Value which will be displayed on this axis
* @return void
*/
public function addData( array $values )
@@ -195,7 +195,6 @@ class ezcGraphChartElementLogarithmicalAxis extends ezcGraphChartElementAxis
/**
* Get coordinate for a dedicated value on the chart
*
- * @param ezcGraphBounding $boundings
* @param float $value Value to determine position for
* @return float Position on chart
*/
diff --git a/src/axis/numeric.php b/src/axis/numeric.php
index fcdc7c4..7134913 100644
--- a/src/axis/numeric.php
+++ b/src/axis/numeric.php
@@ -197,7 +197,7 @@ class ezcGraphChartElementNumericAxis extends ezcGraphChartElementAxis
/**
* Add data for this axis
*
- * @param mixed $value Value which will be displayed on this axis
+ * @param array $values Value which will be displayed on this axis
* @return void
*/
public function addData( array $values )
@@ -285,7 +285,6 @@ class ezcGraphChartElementNumericAxis extends ezcGraphChartElementAxis
/**
* Get coordinate for a dedicated value on the chart
*
- * @param ezcGraphBounding $boundings
* @param float $value Value to determine position for
* @return float Position on chart
*/
diff --git a/src/charts/line.php b/src/charts/line.php
index d04611d..ce353d6 100644
--- a/src/charts/line.php
+++ b/src/charts/line.php
@@ -323,6 +323,13 @@ class ezcGraphLineChart extends ezcGraphChart
return ezcGraph::LINE;
}
+ /**
+ * Renders the basic elements of this chart type
+ *
+ * @param int $width
+ * @param int $height
+ * @return void
+ */
protected function renderElements( $width, $height )
{
if ( !count( $this->data ) )
@@ -430,13 +437,15 @@ class ezcGraphLineChart extends ezcGraphChart
* Does the same as ezcGraphChart::render(), but renders directly to
* output and not into a file.
*
+ * @param int $width
+ * @param int $height
* @return void
*/
- public function renderToOutput( $widht, $height )
+ public function renderToOutput( $width, $height )
{
// @TODO: merge this function with render an deprecate ommit of third
// argument in render() when API break is possible
- $this->renderElements( $widht, $height );
+ $this->renderElements( $width, $height );
$this->renderer->render( null );
}
}
diff --git a/src/charts/pie.php b/src/charts/pie.php
index e346569..0ed57dc 100644
--- a/src/charts/pie.php
+++ b/src/charts/pie.php
@@ -198,6 +198,13 @@ class ezcGraphPieChart extends ezcGraphChart
}
}
+ /**
+ * Renders the basic elements of this chart type
+ *
+ * @param int $width
+ * @param int $height
+ * @return void
+ */
protected function renderElements( $width, $height )
{
if ( !count( $this->data ) )
@@ -270,13 +277,15 @@ class ezcGraphPieChart extends ezcGraphChart
* Does the same as ezcGraphChart::render(), but renders directly to
* output and not into a file.
*
+ * @param int $width
+ * @param int $height
* @return void
*/
- public function renderToOutput( $widht, $height )
+ public function renderToOutput( $width, $height )
{
// @TODO: merge this function with render an deprecate ommit of third
// argument in render() when API break is possible
- $this->renderElements( $widht, $height );
+ $this->renderElements( $width, $height );
$this->renderer->render( null );
}
}
diff --git a/src/charts/radar.php b/src/charts/radar.php
index 9460a0f..0ae2c6b 100644
--- a/src/charts/radar.php
+++ b/src/charts/radar.php
@@ -167,7 +167,9 @@ class ezcGraphRadarChart extends ezcGraphChart
* Sets the axis label position depending on the axis rotation.
*
* @param ezcGraphChartElementAxis $axis
- * @param float $postion
+ * @param ezcGraphBoundings $boundings
+ * @param ezcGraphCoordinate $center
+ * @param float $position
* @param float $lastPosition
* @return void
*/
@@ -334,6 +336,13 @@ class ezcGraphRadarChart extends ezcGraphChart
return ezcGraph::LINE;
}
+ /**
+ * Renders the basic elements of this chart type
+ *
+ * @param int $width
+ * @param int $height
+ * @return void
+ */
protected function renderElements( $width, $height )
{
if ( !count( $this->data ) )
@@ -422,13 +431,15 @@ class ezcGraphRadarChart extends ezcGraphChart
* Does the same as ezcGraphChart::render(), but renders directly to
* output and not into a file.
*
+ * @param int $width
+ * @param int $height
* @return void
*/
- public function renderToOutput( $widht, $height )
+ public function renderToOutput( $width, $height )
{
// @TODO: merge this function with render an deprecate ommit of third
// argument in render() when API break is possible
- $this->renderElements( $widht, $height );
+ $this->renderElements( $width, $height );
$this->renderer->render( null );
}
}
diff --git a/src/data_container/base.php b/src/data_container/base.php
index 41b666b..8c4f0c9 100644
--- a/src/data_container/base.php
+++ b/src/data_container/base.php
@@ -31,6 +31,13 @@ class ezcGraphChartDataContainer implements ArrayAccess, Iterator, Countable
*/
protected $chart;
+ /**
+ * Constructor
+ *
+ * @param ezcGraphChart $chart
+ * @ignore
+ * @return void
+ */
public function __construct( ezcGraphChart $chart )
{
$this->chart = $chart;
@@ -40,6 +47,7 @@ class ezcGraphChartDataContainer implements ArrayAccess, Iterator, Countable
* Adds a dataset to the charts data
*
* @param string $name Name of dataset
+ * @param ezcGraphDataSet $dataSet
* @param mixed $values Values to create dataset with
* @throws ezcGraphTooManyDataSetExceptions
* If too many datasets are created
@@ -96,8 +104,8 @@ class ezcGraphChartDataContainer implements ArrayAccess, Iterator, Countable
* This method is part of the ArrayAccess interface to allow access to the
* data of this object as if it was an array.
*
- * @param string $key Identifier of dataset
- * @param ezcGraphDataSet$value The dataset to assign.
+ * @param string $key
+ * @param ezcGraphDataSet $value
* @return void
*
* @throws ezcBaseValueException
@@ -119,7 +127,7 @@ class ezcGraphChartDataContainer implements ArrayAccess, Iterator, Countable
* This method is part of the ArrayAccess interface to allow access to the
* data of this object as if it was an array.
*
- * @param int $offset The offset to unset the value for.
+ * @param string $key
* @return void
*/
public function offsetUnset( $key )
diff --git a/src/data_container/single.php b/src/data_container/single.php
index 6c16bb0..45ed951 100644
--- a/src/data_container/single.php
+++ b/src/data_container/single.php
@@ -20,8 +20,8 @@ class ezcGraphChartSingleDataContainer extends ezcGraphChartDataContainer
/**
* Adds a dataset to the charts data
*
- * @param string $name Name of dataset
- * @param mixed $values Values to create dataset with
+ * @param string $name
+ * @param ezcGraphDataSet $dataSet
* @throws ezcGraphTooManyDataSetExceptions
* If too many datasets are created
* @return ezcGraphDataSet
diff --git a/src/datasets/array.php b/src/datasets/array.php
index 25e01c4..deb13ec 100644
--- a/src/datasets/array.php
+++ b/src/datasets/array.php
@@ -19,7 +19,7 @@ class ezcGraphArrayDataSet extends ezcGraphDataSet
/**
* Constructor
*
- * @param array|Iterator $options Array or Iterator containing the data
+ * @param array|Iterator $data Array or Iterator containing the data
* @return void
*/
public function __construct( $data )
diff --git a/src/datasets/average.php b/src/datasets/average.php
index e2f701e..0eb70a5 100644
--- a/src/datasets/average.php
+++ b/src/datasets/average.php
@@ -68,7 +68,7 @@ class ezcGraphDataSetAveragePolynom extends ezcGraphDataSet
/**
* Constructor
*
- * @param array $dataset Dataset to interpolate
+ * @param ezcGraphDataSet $dataset Dataset to interpolate
* @param int $order Maximum order of interpolating polynom
* @return void
* @ignore
diff --git a/src/datasets/base.php b/src/datasets/base.php
index e51e97e..3a3ac80 100644
--- a/src/datasets/base.php
+++ b/src/datasets/base.php
@@ -63,7 +63,6 @@ abstract class ezcGraphDataSet implements ArrayAccess, Iterator, Countable
/**
* Constructor
*
- * @param array $options Default option array
* @return void
* @ignore
*/
diff --git a/src/driver/flash.php b/src/driver/flash.php
index d8b10ec..b84ad9f 100644
--- a/src/driver/flash.php
+++ b/src/driver/flash.php
@@ -187,7 +187,7 @@ class ezcGraphFlashDriver extends ezcGraphDriver
* @param float $thickness Line thickness
* @return void
*/
- public function drawPolygon( array $points, ezcGraphColor $color, $filled = true, $thickness = 1 )
+ public function drawPolygon( array $points, ezcGraphColor $color, $filled = true, $thickness = 1. )
{
$movie = $this->getDocument();
@@ -232,7 +232,7 @@ class ezcGraphFlashDriver extends ezcGraphDriver
* @param float $thickness Line thickness
* @return void
*/
- public function drawLine( ezcGraphCoordinate $start, ezcGraphCoordinate $end, ezcGraphColor $color, $thickness = 1 )
+ public function drawLine( ezcGraphCoordinate $start, ezcGraphCoordinate $end, ezcGraphColor $color, $thickness = 1. )
{
$movie = $this->getDocument();
@@ -343,14 +343,15 @@ class ezcGraphFlashDriver extends ezcGraphDriver
/**
* Render text depending of font type and available font extensions
*
- * @param resource $image Image resource
- * @param string $text Text
- * @param int $type Font type
- * @param string $path Font path
- * @param ezcGraphColor $color Font color
- * @param ezcGraphCoordinate $position Position
- * @param float $size Textsize
- * @param ezcGraphRotation $rotation
+ * @param string $id
+ * @param string $text
+ * @param string $chars
+ * @param int $type
+ * @param string $path
+ * @param ezcGraphColor $color
+ * @param ezcGraphCoordinate $position
+ * @param float $size
+ * @param float $rotation
* @return void
*/
protected function renderText( $id, $text, $chars, $type, $path, ezcGraphColor $color, ezcGraphCoordinate $position, $size, $rotation = null )
@@ -688,7 +689,7 @@ class ezcGraphFlashDriver extends ezcGraphDriver
* @param mixed $startAngle
* @param mixed $endAngle
* @param ezcGraphColor $color
- * @param mixed $filled
+ * @param bool $filled
* @return string Element id
*/
protected function simulateCircularArc( ezcGraphCoordinate $center, $width, $height, $size, $startAngle, $endAngle, ezcGraphColor $color, $filled )
@@ -765,6 +766,7 @@ class ezcGraphFlashDriver extends ezcGraphDriver
* @param float $startAngle Starting angle of circle sector
* @param float $endAngle Ending angle of circle sector
* @param ezcGraphColor $color Color of Border
+ * @param bool $filled
* @return void
*/
public function drawCircularArc( ezcGraphCoordinate $center, $width, $height, $size, $startAngle, $endAngle, ezcGraphColor $color, $filled = true )
diff --git a/src/driver/gd.php b/src/driver/gd.php
index 7fb1677..a36b691 100644
--- a/src/driver/gd.php
+++ b/src/driver/gd.php
@@ -195,7 +195,7 @@ class ezcGraphGdDriver extends ezcGraphDriver
* @param float $thickness Line thickness
* @return void
*/
- public function drawPolygon( array $points, ezcGraphColor $color, $filled = true, $thickness = 1 )
+ public function drawPolygon( array $points, ezcGraphColor $color, $filled = true, $thickness = 1. )
{
$image = $this->getImage();
@@ -232,7 +232,7 @@ class ezcGraphGdDriver extends ezcGraphDriver
* @param float $thickness Line thickness
* @return void
*/
- public function drawLine( ezcGraphCoordinate $start, ezcGraphCoordinate $end, ezcGraphColor $color, $thickness = 1 )
+ public function drawLine( ezcGraphCoordinate $start, ezcGraphCoordinate $end, ezcGraphColor $color, $thickness = 1. )
{
$image = $this->getImage();
@@ -817,6 +817,7 @@ class ezcGraphGdDriver extends ezcGraphDriver
* @param float $startAngle Starting angle of circle sector
* @param float $endAngle Ending angle of circle sector
* @param ezcGraphColor $color Color of Border
+ * @param bool $filled
* @return void
*/
public function drawCircularArc( ezcGraphCoordinate $center, $width, $height, $size, $startAngle, $endAngle, ezcGraphColor $color, $filled = true )
diff --git a/src/driver/svg.php b/src/driver/svg.php
index 573097c..0160674 100644
--- a/src/driver/svg.php
+++ b/src/driver/svg.php
@@ -277,7 +277,7 @@ class ezcGraphSvgDriver extends ezcGraphDriver
* @param float $thickness Line thickness.
* @return string Formatstring
*/
- protected function getStyle( ezcGraphColor $color, $filled = true, $thickness = 1 )
+ protected function getStyle( ezcGraphColor $color, $filled = true, $thickness = 1. )
{
if ( $filled )
{
@@ -325,7 +325,7 @@ class ezcGraphSvgDriver extends ezcGraphDriver
* @param float $thickness Line thickness
* @return void
*/
- public function drawPolygon( array $points, ezcGraphColor $color, $filled = true, $thickness = 1 )
+ public function drawPolygon( array $points, ezcGraphColor $color, $filled = true, $thickness = 1. )
{
$this->createDocument();
@@ -379,7 +379,7 @@ class ezcGraphSvgDriver extends ezcGraphDriver
* @param float $thickness Line thickness
* @return void
*/
- public function drawLine( ezcGraphCoordinate $start, ezcGraphCoordinate $end, ezcGraphColor $color, $thickness = 1 )
+ public function drawLine( ezcGraphCoordinate $start, ezcGraphCoordinate $end, ezcGraphColor $color, $thickness = 1. )
{
$this->createDocument();
@@ -905,6 +905,7 @@ class ezcGraphSvgDriver extends ezcGraphDriver
* @param float $startAngle Starting angle of circle sector
* @param float $endAngle Ending angle of circle sector
* @param ezcGraphColor $color Color of Border
+ * @param bool $filled
* @return void
*/
public function drawCircularArc( ezcGraphCoordinate $center, $width, $height, $size, $startAngle, $endAngle, ezcGraphColor $color, $filled = true )
diff --git a/src/driver/verbose.php b/src/driver/verbose.php
index 64c8138..7739533 100644
--- a/src/driver/verbose.php
+++ b/src/driver/verbose.php
@@ -18,8 +18,20 @@
class ezcGraphVerboseDriver extends ezcGraphDriver
{
+ /**
+ * Number of call on driver
+ *
+ * @var int
+ */
protected $call = 0;
+ /**
+ * Constructor
+ *
+ * @param array $options
+ * @return void
+ * @ignore
+ */
public function __construct( array $options = array() )
{
$this->options = new ezcGraphSvgDriverOptions( $options );
@@ -29,12 +41,13 @@ class ezcGraphVerboseDriver extends ezcGraphDriver
/**
* Draws a single polygon
*
- * @param mixed $points
+ * @param array $points
* @param ezcGraphColor $color
- * @param mixed $filled
+ * @param bool $filled
+ * @param float $thickness
* @return void
*/
- public function drawPolygon( array $points, ezcGraphColor $color, $filled = true, $thickness = 1 )
+ public function drawPolygon( array $points, ezcGraphColor $color, $filled = true, $thickness = 1. )
{
$pointString = '';
foreach ( $points as $point )
@@ -55,9 +68,10 @@ class ezcGraphVerboseDriver extends ezcGraphDriver
* @param ezcGraphCoordinate $start
* @param ezcGraphCoordinate $end
* @param ezcGraphColor $color
+ * @param float $thickness
* @return void
*/
- public function drawLine( ezcGraphCoordinate $start, ezcGraphCoordinate $end, ezcGraphColor $color, $thickness = 1 )
+ public function drawLine( ezcGraphCoordinate $start, ezcGraphCoordinate $end, ezcGraphColor $color, $thickness = 1. )
{
printf( "% 4d: Draw line from ( %.2f, %.2f ) to ( %.2f, %.2f ) with thickness %d.\n",
$this->call++,
@@ -89,7 +103,7 @@ class ezcGraphVerboseDriver extends ezcGraphDriver
* @param ezcGraphCoordinate $position
* @param mixed $width
* @param mixed $height
- * @param ezcGraphColor $color
+ * @param int $align
* @param ezcGraphRotation $rotation
* @return void
*/
@@ -114,6 +128,7 @@ class ezcGraphVerboseDriver extends ezcGraphDriver
* @param mixed $startAngle
* @param mixed $endAngle
* @param ezcGraphColor $color
+ * @param bool $filled
* @return void
*/
public function drawCircleSector( ezcGraphCoordinate $center, $width, $height, $startAngle, $endAngle, ezcGraphColor $color, $filled = true )
@@ -140,6 +155,7 @@ class ezcGraphVerboseDriver extends ezcGraphDriver
* @param float $startAngle Starting angle of circle sector
* @param float $endAngle Ending angle of circle sector
* @param ezcGraphColor $color Color of Border
+ * @param bool $filled
* @return void
*/
public function drawCircularArc( ezcGraphCoordinate $center, $width, $height, $size, $startAngle, $endAngle, ezcGraphColor $color, $filled = true )
diff --git a/src/element/axis.php b/src/element/axis.php
index f5eba04..30af47a 100644
--- a/src/element/axis.php
+++ b/src/element/axis.php
@@ -328,7 +328,7 @@ abstract class ezcGraphChartElementAxis extends ezcGraphChartElement
/**
* Add data for this axis
*
- * @param mixed $value Value which will be displayed on this axis
+ * @param array $values
* @return void
*/
abstract public function addData( array $values );
diff --git a/src/element/background.php b/src/element/background.php
index 0aef4ba..77c5264 100644
--- a/src/element/background.php
+++ b/src/element/background.php
@@ -126,6 +126,15 @@ class ezcGraphChartElementBackground extends ezcGraphChartElement
}
}
+ /**
+ * __get
+ *
+ * @param mixed $propertyName
+ * @throws ezcBasePropertyNotFoundException
+ * If a the value for the property options is not an instance of
+ * @return mixed
+ * @ignore
+ */
public function __get( $propertyName )
{
switch ( $propertyName )
diff --git a/src/element/legend.php b/src/element/legend.php
index cab5ec9..4558feb 100644
--- a/src/element/legend.php
+++ b/src/element/legend.php
@@ -144,6 +144,15 @@ class ezcGraphChartElementLegend extends ezcGraphChartElement
}
}
+ /**
+ * __get
+ *
+ * @param mixed $propertyName
+ * @throws ezcBasePropertyNotFoundException
+ * If a the value for the property options is not an instance of
+ * @return mixed
+ * @ignore
+ */
public function __get( $propertyName )
{
switch ( $propertyName )
@@ -158,7 +167,7 @@ class ezcGraphChartElementLegend extends ezcGraphChartElement
/**
* Generate legend from several datasets with on entry per dataset
*
- * @param array $datasets
+ * @param ezcGraphChartDataContainer $datasets
* @return void
*/
public function generateFromDataSets( ezcGraphChartDataContainer $datasets )
diff --git a/src/interfaces/axis_label_renderer.php b/src/interfaces/axis_label_renderer.php
index e58d913..3e2503e 100644
--- a/src/interfaces/axis_label_renderer.php
+++ b/src/interfaces/axis_label_renderer.php
@@ -175,6 +175,27 @@ abstract class ezcGraphAxisLabelRenderer extends ezcBaseOptions
}
}
+ /**
+ * Checks for the cutting point of two lines.
+ *
+ * The lines are given by a start position and the direction of the line,
+ * both as instances of ezcGraphCoordinate. If no cutting point could be
+ * calculated, because the lines are parallel the function will return
+ * false. Otherwise the factor returned can be used to calculate the
+ * cutting point using the following equatation:
+ * point = $aStart + $factor * $aDir;
+ *
+ * We return the factor instead of the resulting point because it can be
+ * easily determined from the factor if the cutting point is in "behind"
+ * the line starting point, or if the distance to the cutting point is
+ * bigger then the direction vector is long ( $factor > 1 ).
+ *
+ * @param ezcGraphCoordinate $aStart
+ * @param ezcGraphCoordinate $aDir
+ * @param ezcGraphCoordinate $bStart
+ * @param ezcGraphCoordinate $bDir
+ * @return mixed
+ */
public function determineLineCuttingPoint( ezcGraphCoordinate $aStart, ezcGraphCoordinate $aDir, ezcGraphCoordinate $bStart, ezcGraphCoordinate $bDir )
{
// Check if lines are parallel
diff --git a/src/interfaces/dataset_property.php b/src/interfaces/dataset_property.php
index 7fd7d52..fe6a3d7 100644
--- a/src/interfaces/dataset_property.php
+++ b/src/interfaces/dataset_property.php
@@ -40,13 +40,18 @@ abstract class ezcGraphDataSetProperty implements ArrayAccess
/**
* Abstract method to contain the check for validity of the value
*
- * @param & $value
- * @abstract
- * @access protected
+ * @param mixed $value
* @return void
*/
abstract protected function checkValue( &$value );
+ /**
+ * Constructor
+ *
+ * @param ezcGraphDataSet $dataset
+ * @ignore
+ * @return void
+ */
public function __construct( ezcGraphDataSet $dataset )
{
$this->dataset = $dataset;
diff --git a/src/interfaces/driver.php b/src/interfaces/driver.php
index 84ea403..9e4819a 100644
--- a/src/interfaces/driver.php
+++ b/src/interfaces/driver.php
@@ -94,7 +94,7 @@ abstract class ezcGraphDriver
* is a valid simplification, because we do not have any polygones which
* have an inner angle >= 180 degrees.
*
- * @param array( ezcGraphCoordinate ) $points
+ * @param array(ezcGraphCoordinate) $points
* @param float $size
* @throws ezcGraphReducementFailedException
* @return array( ezcGraphCoordinate )
@@ -246,9 +246,11 @@ abstract class ezcGraphDriver
* )
*
* @param ezcGraphCoordinate $center
- * @param mixed $startAngle
- * @param mixed $endAngle
- * @param mixed $size
+ * @param float $width
+ * @param float $height
+ * @param float $startAngle
+ * @param float $endAngle
+ * @param float $size
* @throws ezcGraphReducementFailedException
* @return array
*/
@@ -418,7 +420,7 @@ abstract class ezcGraphDriver
* @param float $thickness Line thickness
* @return void
*/
- abstract public function drawPolygon( array $points, ezcGraphColor $color, $filled = true, $thickness = 1 );
+ abstract public function drawPolygon( array $points, ezcGraphColor $color, $filled = true, $thickness = 1. );
/**
* Draws a line
@@ -429,7 +431,7 @@ abstract class ezcGraphDriver
* @param float $thickness Line thickness
* @return void
*/
- abstract public function drawLine( ezcGraphCoordinate $start, ezcGraphCoordinate $end, ezcGraphColor $color, $thickness = 1 );
+ abstract public function drawLine( ezcGraphCoordinate $start, ezcGraphCoordinate $end, ezcGraphColor $color, $thickness = 1. );
/**
* Returns boundings of text depending on the available font extension
@@ -656,6 +658,7 @@ abstract class ezcGraphDriver
* @param float $startAngle Starting angle of circle sector
* @param float $endAngle Ending angle of circle sector
* @param ezcGraphColor $color Color of Border
+ * @param bool $filled Fill state
* @return void
*/
abstract public function drawCircularArc( ezcGraphCoordinate $center, $width, $height, $size, $startAngle, $endAngle, ezcGraphColor $color, $filled = true );
diff --git a/src/interfaces/element.php b/src/interfaces/element.php
index b2523d5..316efbc 100644
--- a/src/interfaces/element.php
+++ b/src/interfaces/element.php
@@ -243,11 +243,21 @@ abstract class ezcGraphChartElement extends ezcBaseOptions
* This method receives and returns a part of the canvas where it can be
* rendered on.
*
- * @param ezcGraphBoundings $boundings Part of canvase to render element on
+ * @param ezcGraphRenderer $renderer
+ * @param ezcGraphBoundings $boundings
* @return ezcGraphBoundings Part of canvas, which is still free to draw on
*/
abstract public function render( ezcGraphRenderer $renderer, ezcGraphBoundings $boundings );
+ /**
+ * Returns calculated boundings based on available percentual space of
+ * given bounding box specified in the elements options and direction of
+ * the box.
+ *
+ * @param ezcGraphBoundings $boundings
+ * @param int $direction
+ * @return ezcGraphBoundings
+ */
protected function getTitleSize( ezcGraphBoundings $boundings, $direction = ezcGraph::HORIZONTAL )
{
if ( $direction === ezcGraph::HORIZONTAL )
diff --git a/src/interfaces/radar_renderer.php b/src/interfaces/radar_renderer.php
index f959ef0..4f251c4 100644
--- a/src/interfaces/radar_renderer.php
+++ b/src/interfaces/radar_renderer.php
@@ -48,7 +48,7 @@ interface ezcGraphRadarRenderer
$symbol = ezcGraph::NO_SYMBOL,
ezcGraphColor $symbolColor = null,
ezcGraphColor $fillColor = null,
- $thickness = 1
+ $thickness = 1.
);
}
diff --git a/src/interfaces/renderer.php b/src/interfaces/renderer.php
index 5cdc60f..2a05b8f 100644
--- a/src/interfaces/renderer.php
+++ b/src/interfaces/renderer.php
@@ -114,7 +114,7 @@ abstract class ezcGraphRenderer
* @param float $startAngle Start angle
* @param float $endAngle End angle
* @param string $label Label of pie segment
- * @param float $moveOut Move out from middle for hilighting
+ * @param bool $moveOut Move out from middle for hilighting
* @return void
*/
abstract public function drawPieSegment(
@@ -186,7 +186,7 @@ abstract class ezcGraphRenderer
ezcGraphColor $symbolColor = null,
ezcGraphColor $fillColor = null,
$axisPosition = 0.,
- $thickness = 1
+ $thickness = 1.
);
/**
@@ -204,6 +204,7 @@ abstract class ezcGraphRenderer
* @param ezcGraphFontOptions $font Font used for highlight string
* @param string $text Acutual value
* @param int $size Size of highlight text
+ * @param ezcGraphColor $markLines
* @return void
*/
abstract public function drawDataHighlightText(
@@ -225,7 +226,7 @@ abstract class ezcGraphRenderer
* Will draw a legend in the bounding box
*
* @param ezcGraphBoundings $boundings Bounding of legend
- * @param ezcGraphChartElementLegend $labels Legend to draw
+ * @param ezcGraphChartElementLegend $legend Legend to draw
* @param int $type Type of legend: Protrait or landscape
* @return void
*/
@@ -310,7 +311,7 @@ abstract class ezcGraphRenderer
* @param ezcGraphCoordinate $start Start point of axis
* @param ezcGraphCoordinate $end Endpoint of axis
* @param ezcGraphChartElementAxis $axis Axis to render
- * @param ezcGraphLabelRenderer $labelClass Used label renderer
+ * @param ezcGraphAxisLabelRenderer $labelClass Used label renderer
* @return void
*/
abstract public function drawAxis(
diff --git a/src/math/boundings.php b/src/math/boundings.php
index a8f474f..b6dd5f0 100644
--- a/src/math/boundings.php
+++ b/src/math/boundings.php
@@ -57,7 +57,7 @@ class ezcGraphBoundings
* @param float $y1 Bottom right y coordinate
* @return ezcGraphBoundings
*/
- public function __construct( $x0 = 0, $y0 = 0, $x1 = false, $y1 = false )
+ public function __construct( $x0 = 0., $y0 = 0., $x1 = false, $y1 = false )
{
$this->x0 = $x0;
$this->y0 = $y0;
diff --git a/src/math/polynom.php b/src/math/polynom.php
index 5266191..6dd2fec 100644
--- a/src/math/polynom.php
+++ b/src/math/polynom.php
@@ -15,6 +15,21 @@
*/
class ezcGraphPolynom
{
+ /**
+ * Factors of the polynom
+ *
+ * An example:
+ * Polynom:
+ * 2 * x^3 + .5 * x - 3
+ * Array:
+ * array (
+ * (int) 3 => (float) 2,
+ * (int) 1 => (float) .5,
+ * (int) 0 => (float) -3,
+ * )
+ *
+ * @var array
+ */
protected $values;
// @TODO: Introduce precision option for string output?
diff --git a/src/math/transformation.php b/src/math/transformation.php
index 7f45d41..37f2dba 100644
--- a/src/math/transformation.php
+++ b/src/math/transformation.php
@@ -25,8 +25,6 @@ class ezcGraphTransformation extends ezcGraphMatrix
* define the initial matrix values. If no array is given an identity
* matrix is created.
*
- * @param int $rows
- * @param int $columns
* @param array $values
* @return void
*/
diff --git a/src/math/translation.php b/src/math/translation.php
index 8c2b5a6..aaf021b 100644
--- a/src/math/translation.php
+++ b/src/math/translation.php
@@ -17,7 +17,15 @@
*/
class ezcGraphTranslation extends ezcGraphTransformation
{
- public function __construct( $x = 0, $y = 0 )
+ /**
+ * Constructor
+ *
+ * @param float $x
+ * @param float $y
+ * @return void
+ * @ignore
+ */
+ public function __construct( $x = 0., $y = 0. )
{
parent::__construct( array(
array( 1, 0, $x ),
diff --git a/src/options/chart.php b/src/options/chart.php
index 075a852..75abcaf 100644
--- a/src/options/chart.php
+++ b/src/options/chart.php
@@ -22,6 +22,13 @@
*/
class ezcGraphChartOptions extends ezcBaseOptions
{
+ /**
+ * Constructor
+ *
+ * @param array $options Default option array
+ * @return void
+ * @ignore
+ */
public function __construct( array $options = array() )
{
$this->properties['width'] = null;
diff --git a/src/options/font.php b/src/options/font.php
index 7ce1529..236931f 100644
--- a/src/options/font.php
+++ b/src/options/font.php
@@ -51,6 +51,11 @@
*/
class ezcGraphFontOptions extends ezcBaseOptions
{
+ /**
+ * Indicates if path already has been checked for correct font
+ *
+ * @var bool
+ */
protected $pathChecked = false;
/**
diff --git a/src/renderer/2d.php b/src/renderer/2d.php
index 6be4956..bd1e811 100644
--- a/src/renderer/2d.php
+++ b/src/renderer/2d.php
@@ -112,7 +112,7 @@ class ezcGraphRenderer2d
* @param float $startAngle Start angle
* @param float $endAngle End angle
* @param string $label Label of pie segment
- * @param float $moveOut Move out from middle for hilighting
+ * @param bool $moveOut Move out from middle for hilighting
* @return void
*/
public function drawPieSegment(
@@ -563,7 +563,7 @@ class ezcGraphRenderer2d
ezcGraphColor $symbolColor = null,
ezcGraphColor $fillColor = null,
$axisPosition = 0.,
- $thickness = 1)
+ $thickness = 1. )
{
// Perhaps fill up line
if ( $fillColor !== null &&
@@ -688,6 +688,16 @@ class ezcGraphRenderer2d
}
}
+ /**
+ * Returns a coordinate in the given bounding box for the given angle
+ * radius with the center as base point.
+ *
+ * @param ezcGraphBoundings $boundings
+ * @param ezcGraphCoordinate $center
+ * @param float $angle
+ * @param float $radius
+ * @return float
+ */
protected function getCoordinateFromAngleAndRadius(
ezcGraphBoundings $boundings,
ezcGraphCoordinate $center,
@@ -751,7 +761,7 @@ class ezcGraphRenderer2d
$symbol = ezcGraph::NO_SYMBOL,
ezcGraphColor $symbolColor = null,
ezcGraphColor $fillColor = null,
- $thickness = 1
+ $thickness = 1.
)
{
// Calculate line points from chart coordinates
@@ -823,6 +833,7 @@ class ezcGraphRenderer2d
* @param ezcGraphFontOptions $font Font used for highlight string
* @param string $text Acutual value
* @param int $size Size of highlight text
+ * @param ezcGraphColor $markLines
* @return void
*/
public function drawDataHighlightText(
@@ -879,7 +890,7 @@ class ezcGraphRenderer2d
* Will draw a legend in the bounding box
*
* @param ezcGraphBoundings $boundings Bounding of legend
- * @param ezcGraphChartElementLegend $labels Legend to draw
+ * @param ezcGraphChartElementLegend $legend Legend to draw;
* @param int $type Type of legend: Protrait or landscape
* @return void
*/
@@ -1150,7 +1161,7 @@ class ezcGraphRenderer2d
* @param ezcGraphCoordinate $start Start point of axis
* @param ezcGraphCoordinate $end Endpoint of axis
* @param ezcGraphChartElementAxis $axis Axis to render
- * @param ezcGraphLabelRenderer $labelClass Used label renderer
+ * @param ezcGraphAxisLabelRenderer $labelClass Used label renderer
* @return void
*/
public function drawAxis(
diff --git a/src/renderer/3d.php b/src/renderer/3d.php
index d9771b5..42cfd83 100644
--- a/src/renderer/3d.php
+++ b/src/renderer/3d.php
@@ -160,10 +160,10 @@ class ezcGraphRenderer3d
* chart.
*
* @param ezcGraphCoordinate $c Coordinate
- * @param flot $front Distance to front (0 - 1)
+ * @param float $front Distance to front (0 - 1)
* @return ezcGraphCoordinate Resulting coordinate
*/
- protected function get3dCoordinate( ezcGraphCoordinate $c, $front = true )
+ protected function get3dCoordinate( ezcGraphCoordinate $c, $front = 1. )
{
return new ezcGraphCoordinate(
( $c->x - $this->dataBoundings->x0 ) * $this->xDepthFactor + $this->dataBoundings->x0 + $this->depth * $front,
@@ -182,7 +182,7 @@ class ezcGraphRenderer3d
* @param float $startAngle Start angle
* @param float $endAngle End angle
* @param string $label Label of pie segment
- * @param float $moveOut Move out from middle for hilighting
+ * @param bool $moveOut Move out from middle for hilighting
* @return void
*/
public function drawPieSegment(
@@ -1154,7 +1154,7 @@ class ezcGraphRenderer3d
ezcGraphColor $symbolColor = null,
ezcGraphColor $fillColor = null,
$axisPosition = 0.,
- $thickness = 1 )
+ $thickness = 1. )
{
// Calculate line width based on options
if ( $this->options->seperateLines )
@@ -1330,6 +1330,7 @@ class ezcGraphRenderer3d
* @param ezcGraphFontOptions $font Font used for highlight string
* @param string $text Acutual value
* @param int $size Size of highlight text
+ * @param ezcGraphColor $markLines
* @return void
*/
public function drawDataHighlightText(
@@ -1396,7 +1397,7 @@ class ezcGraphRenderer3d
* Will draw a legend in the bounding box
*
* @param ezcGraphBoundings $boundings Bounding of legend
- * @param ezcGraphChartElementLegend $labels Legend to draw
+ * @param ezcGraphChartElementLegend $legend Legend to draw;
* @param int $type Type of legend: Protrait or landscape
* @return void
*/
@@ -1789,7 +1790,7 @@ class ezcGraphRenderer3d
* @param ezcGraphCoordinate $start Start point of axis
* @param ezcGraphCoordinate $end Endpoint of axis
* @param ezcGraphChartElementAxis $axis Axis to render
- * @param ezcGraphLabelRenderer $labelClass Used label renderer
+ * @param ezcGraphAxisLabelRenderer $labelClass Used label renderer
* @return void
*/
public function drawAxis(
diff --git a/src/renderer/axis_label_radar.php b/src/renderer/axis_label_radar.php
index 938c34e..4d0bd0e 100644
--- a/src/renderer/axis_label_radar.php
+++ b/src/renderer/axis_label_radar.php
@@ -266,6 +266,7 @@ class ezcGraphAxisRadarLabelRenderer extends ezcGraphAxisLabelRenderer
* @param ezcGraphCoordinate $position Position of step
* @param ezcGraphCoordinate $direction Direction of axis
* @param ezcGraphColor $color Color of axis
+ * @param int $stepPosition
* @return void
*/
protected function drawGrid( ezcGraphRenderer $renderer, ezcGraphBoundings $boundings, ezcGraphCoordinate $position, ezcGraphCoordinate $direction, ezcGraphColor $color, $stepPosition = null )
diff --git a/src/structs/context.php b/src/structs/context.php
index 6640d67..1110bad 100644
--- a/src/structs/context.php
+++ b/src/structs/context.php
@@ -39,8 +39,9 @@ class ezcGraphContext extends ezcBaseStruct
/**
* Simple constructor
*
- * @param string $dataset Name of dataset
- * @param string $datapoint Name of datapoint
+ * @param string $dataset
+ * @param string $datapoint
+ * @param string $url
* @return void
* @ignore
*/
diff --git a/src/structs/step.php b/src/structs/step.php
index 1838bfa..faedbc7 100644
--- a/src/structs/step.php
+++ b/src/structs/step.php
@@ -64,6 +64,8 @@ class ezcGraphAxisStep
* @param float $width
* @param string $label
* @param array $childs
+ * @param bool $isZero
+ * @param bool $isLast
* @ignore
*/
public function __construct( $position = .0, $width = .0, $label = false, array $childs = array(), $isZero = false, $isLast = false )
OpenPOWER on IntegriCloud