From ab387b554edd96e61b7728aee6a83e189e751988 Mon Sep 17 00:00:00 2001 From: Robert Sesek Date: Sat, 11 Feb 2006 21:18:58 +0000 Subject: [PATCH] Add setter methods for title and legend --- graph_pie.php | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/graph_pie.php b/graph_pie.php index db1e13f..2508e29 100644 --- a/graph_pie.php +++ b/graph_pie.php @@ -215,6 +215,32 @@ class Graph_Pie $this->image = imagecreate($this->dimensions['width'], $this->dimensions['height']); } + // ################################################################### + /** + * Sets whether or not a legend is created for the graph + * + * @access public + * + * @param bool Draw a legend? + */ + function set_legend($yesno) + { + $this->legend = (bool)$yesno; + } + + // ################################################################### + /** + * Sets the title of the chart to be drawn above the graph + * + * @access public + * + * @param string Title of the chart + */ + function set_title($title) + { + $this->title = $title; + } + // ################################################################### /** * Adds an entry to the data set without specifying a colour to add. -- 2.22.5