Skip to content

Commit 0c3eb4b

Browse files
authored
Update Chart.php
1 parent 4c9e750 commit 0c3eb4b

File tree

1 file changed

+58
-0
lines changed

1 file changed

+58
-0
lines changed

src/PhpWord/Style/Chart.php

Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,20 @@ class Chart extends AbstractStyle
5151
* @var array
5252
*/
5353
private $colors = array();
54+
55+
/**
56+
* Chart title
57+
*
58+
* @var string
59+
*/
60+
private $title = null;
61+
62+
/**
63+
* Chart legend visibility
64+
*
65+
* @var bool
66+
*/
67+
private $showLegend = false;
5468

5569
/**
5670
* A list of display options for data labels
@@ -220,6 +234,50 @@ public function setColors($value = array())
220234

221235
return $this;
222236
}
237+
238+
/**
239+
* Get the chart title
240+
*
241+
* @return string
242+
*/
243+
public function getTitle()
244+
{
245+
return $this->title;
246+
}
247+
248+
/**
249+
* Set the chart title
250+
*
251+
* @param string $value
252+
*/
253+
public function setTitle($value = null)
254+
{
255+
$this->title = $value;
256+
257+
return $this;
258+
}
259+
260+
/**
261+
* Get chart legend visibility
262+
*
263+
* @return bool
264+
*/
265+
public function getShowLegend()
266+
{
267+
return $this->showLegend;
268+
}
269+
270+
/**
271+
* Set chart legend visibility
272+
*
273+
* @param bool $value
274+
*/
275+
public function setShowLegend($value = false)
276+
{
277+
$this->showLegend = $value;
278+
279+
return $this;
280+
}
223281

224282
/*
225283
* Show labels for axis

0 commit comments

Comments
 (0)