summaryrefslogtreecommitdiffstats
path: root/src/axis
diff options
context:
space:
mode:
Diffstat (limited to 'src/axis')
-rw-r--r--src/axis/labeled.php13
-rw-r--r--src/axis/numeric.php13
2 files changed, 26 insertions, 0 deletions
diff --git a/src/axis/labeled.php b/src/axis/labeled.php
index cf1277f..7b1225c 100644
--- a/src/axis/labeled.php
+++ b/src/axis/labeled.php
@@ -204,6 +204,19 @@ class ezcGraphChartElementLabeledAxis extends ezcGraphChartElementAxis
return false;
}
}
+
+ /**
+ * 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
+ */
+ public function isZeroStep( $step )
+ {
+ return !$step;
+ }
}
?>
diff --git a/src/axis/numeric.php b/src/axis/numeric.php
index 8713f1c..5a478e1 100644
--- a/src/axis/numeric.php
+++ b/src/axis/numeric.php
@@ -326,6 +326,19 @@ class ezcGraphChartElementNumericAxis extends ezcGraphChartElementAxis
{
return $this->min + ( $step * $this->majorStep );
}
+
+ /**
+ * 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
+ */
+ public function isZeroStep( $step )
+ {
+ return ( $this->getLabel( $step ) == 0 );
+ }
}
?>
OpenPOWER on IntegriCloud