setType($type); $this->addSeries($categories, $values); } /** * Get type * * @return string */ public function getType() { return $this->type; } /** * Set type * * @param string $value */ public function setType($value) { $enum = array('pie', 'doughnut', 'line', 'bar', 'area', 'radar', 'scatter'); $this->type = $this->setEnumVal($value, $enum, 'pie'); } /** * Add series * * @param array $categories * @param array $values */ public function addSeries($categories, $values) { $this->series[] = array('categories' => $categories, 'values' => $values); } /** * Get series * * @return array */ public function getSeries() { return $this->series; } }