summaryrefslogtreecommitdiffstats
path: root/src/element
diff options
context:
space:
mode:
authorKore Nordmann <github@kore-nordmann.de>2006-09-21 12:56:01 +0000
committerKore Nordmann <github@kore-nordmann.de>2006-09-21 12:56:01 +0000
commit1a921c1448b7fb0d205afc20034bd725bf9450c0 (patch)
treee581df6ff6c12f9ac70a01759c8bfbfcefaacbda /src/element
parent9d8baefbdf52a83adfb2efed5ebe4bd7b7f765a7 (diff)
downloadzetacomponents-graph-1a921c1448b7fb0d205afc20034bd725bf9450c0.zip
zetacomponents-graph-1a921c1448b7fb0d205afc20034bd725bf9450c0.tar.gz
- Added documentation
- Removed no longer used exceptions
Diffstat (limited to 'src/element')
-rw-r--r--src/element/axis.php19
-rw-r--r--src/element/background.php38
-rw-r--r--src/element/legend.php15
-rw-r--r--src/element/text.php12
4 files changed, 62 insertions, 22 deletions
diff --git a/src/element/axis.php b/src/element/axis.php
index 22e9d53..3c600cd 100644
--- a/src/element/axis.php
+++ b/src/element/axis.php
@@ -8,7 +8,7 @@
* @license http://ez.no/licenses/new_bsd New BSD License
*/
/**
- * Class to represent a legend as a chart element
+ * Basic axis class
*
* @property float $nullPosition
* The position of the null value.
@@ -175,6 +175,15 @@ abstract class ezcGraphChartElementAxis 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 )
@@ -244,11 +253,11 @@ abstract class ezcGraphChartElementAxis extends ezcGraphChartElement
abstract public function calculateAxisBoundings();
/**
- * Render an axe
+ * Render the axis
*
- * @param ezcGraphRenderer $renderer
- * @access public
- * @return void
+ * @param ezcGraphRenderer $renderer Renderer
+ * @param ezcGraphBoundings $boundings Boundings for the axis
+ * @return ezcGraphBoundings Remaining boundings
*/
public function render( ezcGraphRenderer $renderer, ezcGraphBoundings $boundings )
{
diff --git a/src/element/background.php b/src/element/background.php
index 66e19da..8990e27 100644
--- a/src/element/background.php
+++ b/src/element/background.php
@@ -1,6 +1,6 @@
<?php
/**
- * File containing the abstract ezcGraphChartElementBackground class
+ * File containing the ezcGraphChartElementBackground class
*
* @package Graph
* @version //autogentag//
@@ -8,7 +8,26 @@
* @license http://ez.no/licenses/new_bsd New BSD License
*/
/**
- * Class to represent a legend as a chart element
+ * Chart element representing the background. In addition to the standard
+ * background and border for chart elements it can draw an image on the chart
+ * background, and optionally repeat it. The position will be used for the
+ * repetition offset.
+ *
+ * <code>
+ * $chart->background->image = 'background.png';
+ *
+ * // Image will be repeated horizontal at the top of the background
+ * $chart->background->repeat = ezcGraph::HORIZONTAL;
+ * $chart->background->postion = ezcGraph::TOP;
+ *
+ * // Image will be placed once in the center
+ * $chart->background->repeat = ezcGraph::NO_REPEAT; // default;
+ * $chart->background->position = ezcGraph::CENTER | ezcGraph::MIDDLE;
+ *
+ * //Image will be repeated all over
+ * $chart->background->repeat = ezcGraph::HORIZONTAL | ezcGraph::VERTICAL;
+ * // The position is not relevant here.
+ * </code>
*
* @property string $image
* Filename of the file to use for background
@@ -118,7 +137,10 @@ class ezcGraphChartElementBackground extends ezcGraphChartElement
}
/**
- * Set colors and border fro this element
+ * Set colors and border for this element
+ *
+ * Method is overwritten because we do not ant to apply the global padding
+ * and margin here.
*
* @param ezcGraphPalette $palette Palette
* @return void
@@ -133,11 +155,11 @@ class ezcGraphChartElementBackground extends ezcGraphChartElement
}
/**
- * Render a legend
- *
- * @param ezcGraphRenderer $renderer
- * @access public
- * @return void
+ * Render the background
+ *
+ * @param ezcGraphRenderer $renderer Renderer
+ * @param ezcGraphBoundings $boundings Boundings
+ * @return ezcGraphBoundings Remaining boundings
*/
public function render( ezcGraphRenderer $renderer, ezcGraphBoundings $boundings )
{
diff --git a/src/element/legend.php b/src/element/legend.php
index 4cbd966..031eb91 100644
--- a/src/element/legend.php
+++ b/src/element/legend.php
@@ -153,6 +153,15 @@ class ezcGraphChartElementLegend extends ezcGraphChartElement
}
}
+ /**
+ * Calculated boundings needed for the legend.
+ *
+ * Uses the position and the configured horizontal or vertical size of a
+ * legend to calculate the boundings for the legend.
+ *
+ * @param ezcGraphBoundings $boundings Avalable boundings
+ * @return ezcGraphBoundings Remaining boundings
+ */
protected function calculateBoundings( ezcGraphBoundings $boundings )
{
$this->properties['boundings'] = clone $boundings;
@@ -191,9 +200,9 @@ class ezcGraphChartElementLegend extends ezcGraphChartElement
/**
* Render a legend
*
- * @param ezcGraphRenderer $renderer
- * @access public
- * @return void
+ * @param ezcGraphRenderer $renderer Renderer
+ * @param ezcGraphBoundings $boundings Boundings for the axis
+ * @return ezcGraphBoundings Remaining boundings
*/
public function render( ezcGraphRenderer $renderer, ezcGraphBoundings $boundings )
{
diff --git a/src/element/text.php b/src/element/text.php
index ed7ed85..36e6809 100644
--- a/src/element/text.php
+++ b/src/element/text.php
@@ -1,6 +1,6 @@
<?php
/**
- * File containing the abstract ezcGraphChartElementText class
+ * File containing the ezcGraphChartElementText class
*
* @package Graph
* @version //autogentag//
@@ -8,7 +8,7 @@
* @license http://ez.no/licenses/new_bsd New BSD License
*/
/**
- * Class to represent a legend as a chart element
+ * Chart element to display texts in a chart
*
* @property float $height
* Maximum percent of bounding used to display the text.
@@ -56,11 +56,11 @@ class ezcGraphChartElementText extends ezcGraphChartElement
}
/**
- * Render a legend
+ * Render the text
*
- * @param ezcGraphRenderer $renderer
- * @access public
- * @return void
+ * @param ezcGraphRenderer $renderer Renderer
+ * @param ezcGraphBoundings $boundings Boundings for the axis
+ * @return ezcGraphBoundings Remaining boundings
*/
public function render( ezcGraphRenderer $renderer, ezcGraphBoundings $boundings )
{
OpenPOWER on IntegriCloud