From ccc562dea801231c1f4322f19f05393fd82604fd Mon Sep 17 00:00:00 2001 From: Mark Baker Date: Mon, 18 Jun 2012 22:26:22 +0100 Subject: [PATCH] Setter methods for Title, Legend, X and y axis labels --- Classes/PHPExcel/Chart.php | 48 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 48 insertions(+) diff --git a/Classes/PHPExcel/Chart.php b/Classes/PHPExcel/Chart.php index d7d65819..0b11e5a9 100644 --- a/Classes/PHPExcel/Chart.php +++ b/Classes/PHPExcel/Chart.php @@ -202,6 +202,18 @@ class PHPExcel_Chart return $this->_title; } + /** + * Set Title + * + * @param PHPExcel_Chart_Title $title + * @return PHPExcel_Chart + */ + public function setTitle(PHPExcel_Chart_Title $title) { + $this->_title = $title; + + return $this; + } + /** * Get Legend * @@ -211,6 +223,18 @@ class PHPExcel_Chart return $this->_legend; } + /** + * Set Legend + * + * @param PHPExcel_Chart_Legend $legend + * @return PHPExcel_Chart + */ + public function setLegend(PHPExcel_Chart_Legend $legend) { + $this->_legend = $legend; + + return $this; + } + /** * Get X-Axis Label * @@ -220,6 +244,18 @@ class PHPExcel_Chart return $this->_xAxisLabel; } + /** + * Set X-Axis Label + * + * @param PHPExcel_Chart_Title $label + * @return PHPExcel_Chart + */ + public function setXAxisLabel(PHPExcel_Chart_Title $label) { + $this->_xAxisLabel = $label; + + return $this; + } + /** * Get Y-Axis Label * @@ -229,6 +265,18 @@ class PHPExcel_Chart return $this->_yAxisLabel; } + /** + * Set Y-Axis Label + * + * @param PHPExcel_Chart_Title $label + * @return PHPExcel_Chart + */ + public function setYAxisLabel(PHPExcel_Chart_Title $label) { + $this->_yAxisLabel = $label; + + return $this; + } + /** * Get Plot Area *