diff --git a/library/Icinga/Web/Widget/Chart/InlinePie.php b/library/Icinga/Web/Widget/Chart/InlinePie.php index da63ec403..4b4409e78 100644 --- a/library/Icinga/Web/Widget/Chart/InlinePie.php +++ b/library/Icinga/Web/Widget/Chart/InlinePie.php @@ -24,7 +24,7 @@ class InlinePie extends AbstractWidget const NUMBER_FORMAT_TIME = 'time'; const NUMBER_FORMAT_BYTES = 'bytes'; const NUMBER_FORMAT_RATIO = 'ratio'; - + /** * The template string used for rendering this widget * The template string used for rendering this widget @@ -137,7 +137,7 @@ EOD; * @var string */ private $tooltipFormat = '{{title}} {{label}}: {{formatted}} ({{percent}}%)'; - + /** * The number format used to render numeric values in tooltips * @@ -148,30 +148,36 @@ EOD; /** * Set if the tooltip for the empty area should be hidden * - * @param bool $hide Whether to hide the empty area + * @param bool $hide Whether to hide the empty area + * + * @return $this */ public function setHideEmptyLabel($hide = true) { $this->hideEmptyLabel = $hide; + return $this; } /** * Set the data to be displayed. * - * @param $data array + * @param $data array + * + * @return $this */ public function setData(array $data) { $this->data = $data; $this->url->setParam('data', implode(',', $data)); + return $this; } /** * The labels to be displayed in the pie-chart * - * @param mixed $label The label of the displayed value, or null for no labels + * @param mixed $label The label of the displayed value, or null for no labels * - * @return $this Fluent interface + * @return $this */ public function setLabel($label) { @@ -191,7 +197,9 @@ EOD; /** * Set the colors used by the slices of the pie chart. * - * @param array $colors + * @param array $colors + * + * @return $this */ public function setColors(array $colors = null) { @@ -201,18 +209,22 @@ EOD; } else { $this->url->setParam('colors', null); } + return $this; } /** * Set the used number format * - * @param $format string 'bytes' or 'time' + * @param $format string 'bytes' or 'time' + * + * @return $this */ public function setNumberFormat($format) { $this->format = $format; + return $this; } - + /** * A format string used to render the content of the piechart tooltips * @@ -225,16 +237,23 @@ EOD; *