summaryrefslogtreecommitdiffstats
path: root/src/element
diff options
context:
space:
mode:
authorKore Nordmann <github@kore-nordmann.de>2006-07-24 13:18:08 +0000
committerKore Nordmann <github@kore-nordmann.de>2006-07-24 13:18:08 +0000
commit71789ffa110bba70d34bf937b315b10ee8c17aad (patch)
tree9ad6d196ac175c9e9562b90d6bd00396a428cde4 /src/element
parentff849eb9f302289b044b9f98eadc02cca4ed2130 (diff)
downloadzetacomponents-graph-71789ffa110bba70d34bf937b315b10ee8c17aad.zip
zetacomponents-graph-71789ffa110bba70d34bf937b315b10ee8c17aad.tar.gz
- Added axis label renderer for centered labels
- Fixed: Do not draw grids and steps on other axis
Diffstat (limited to 'src/element')
-rw-r--r--src/element/axis.php17
1 files changed, 15 insertions, 2 deletions
diff --git a/src/element/axis.php b/src/element/axis.php
index 7fb051a..b4805fa 100644
--- a/src/element/axis.php
+++ b/src/element/axis.php
@@ -82,9 +82,12 @@ abstract class ezcGraphChartElementAxis extends ezcGraphChartElement
public function __construct( array $options = array() )
{
- $this->axisLabelRenderer = new ezcGraphAxisExactLabelRenderer();
-
parent::__construct( $options );
+
+ if ( !isset( $this->axisLabelRenderer ) )
+ {
+ $this->axisLabelRenderer = new ezcGraphAxisExactLabelRenderer();
+ }
}
/**
@@ -210,6 +213,16 @@ abstract class ezcGraphChartElementAxis extends ezcGraphChartElement
abstract public function getLabel( $step );
/**
+ * Is zero step
+ *
+ * Returns true if the given step is the one on the initial axis position
+ *
+ * @param int $step Number of step
+ * @return bool Status If given step is initial axis position
+ */
+ abstract public function isZeroStep( $step );
+
+ /**
* Add data for this axis
*
* @param mixed $value Value which will be displayed on this axis
OpenPOWER on IntegriCloud