summaryrefslogtreecommitdiffstats
path: root/src/element
diff options
context:
space:
mode:
authorKore Nordmann <github@kore-nordmann.de>2006-06-08 10:17:39 +0000
committerKore Nordmann <github@kore-nordmann.de>2006-06-08 10:17:39 +0000
commit182ce919974d9ec9a6de098a41c02e2965beaba3 (patch)
tree62cfdc1844240b7e11bdb4e06ba51d09c9d160ff /src/element
parent36d09ff6ac63a135576509dbbc16f6f13cad25dd (diff)
downloadzetacomponents-graph-182ce919974d9ec9a6de098a41c02e2965beaba3.zip
zetacomponents-graph-182ce919974d9ec9a6de098a41c02e2965beaba3.tar.gz
- Refactored axis API to be able to use each axis type for both, X- and Y-axis
Diffstat (limited to 'src/element')
-rw-r--r--src/element/axis.php49
1 files changed, 33 insertions, 16 deletions
diff --git a/src/element/axis.php b/src/element/axis.php
index 0dead4e..32d4c7d 100644
--- a/src/element/axis.php
+++ b/src/element/axis.php
@@ -398,6 +398,23 @@ abstract class ezcGraphChartElementAxis extends ezcGraphChartElement
}
/**
+ * Add data for this axis
+ *
+ * @param mixed $value Value which will be displayed on this axis
+ * @return void
+ */
+ abstract public function addData( array $values );
+
+ /**
+ * Calculate axis bounding values on base of the assigned values
+ *
+ * @abstract
+ * @access public
+ * @return void
+ */
+ abstract public function calculateAxisBoundings();
+
+ /**
* Render an axe
*
* @param ezcGraphRenderer $renderer
@@ -412,12 +429,12 @@ abstract class ezcGraphChartElementAxis extends ezcGraphChartElement
$this->drawAxis(
$renderer,
new ezcGraphCoordinate(
- $this->nullPosition,
- $boundings->y0
+ (int) $this->nullPosition,
+ (int) $boundings->y0
),
new ezcGraphCoordinate(
- $this->nullPosition,
- $boundings->y1
+ (int) $this->nullPosition,
+ (int) $boundings->y1
),
$boundings
);
@@ -426,12 +443,12 @@ abstract class ezcGraphChartElementAxis extends ezcGraphChartElement
$this->drawAxis(
$renderer,
new ezcGraphCoordinate(
- $this->nullPosition,
- $boundings->y1
+ (int) $this->nullPosition,
+ (int) $boundings->y1
),
new ezcGraphCoordinate(
- $this->nullPosition,
- $boundings->y0
+ (int) $this->nullPosition,
+ (int) $boundings->y0
),
$boundings
);
@@ -440,12 +457,12 @@ abstract class ezcGraphChartElementAxis extends ezcGraphChartElement
$this->drawAxis(
$renderer,
new ezcGraphCoordinate(
- $boundings->x0,
- $this->nullPosition
+ (int) $boundings->x0,
+ (int) $this->nullPosition
),
new ezcGraphCoordinate(
- $boundings->x1,
- $this->nullPosition
+ (int) $boundings->x1,
+ (int) $this->nullPosition
),
$boundings
);
@@ -454,12 +471,12 @@ abstract class ezcGraphChartElementAxis extends ezcGraphChartElement
$this->drawAxis(
$renderer,
new ezcGraphCoordinate(
- $boundings->x1,
- $this->nullPosition
+ (int) $boundings->x1,
+ (int) $this->nullPosition
),
new ezcGraphCoordinate(
- $boundings->x0,
- $this->nullPosition
+ (int) $boundings->x0,
+ (int) $this->nullPosition
),
$boundings
);
OpenPOWER on IntegriCloud