setType($type); $this->addSeries($categories, $values); $this->style = $this->setNewStyle(new ChartStyle(), $style, true); } /** * Get type * * @return string */ public function getType() { return $this->type; } /** * Set type. * * @param string $value * @return void */ public function setType($value) { $enum = array('pie', 'doughnut', 'line', 'bar', 'column', 'area', 'radar', 'scatter'); $this->type = $this->setEnumVal($value, $enum, 'pie'); } /** * Add series * * @param array $categories * @param array $values * @return void */ public function addSeries($categories, $values) { $this->series[] = array('categories' => $categories, 'values' => $values); } /** * Get series * * @return array */ public function getSeries() { return $this->series; } /** * Get chart style * * @return \PhpOffice\PhpWord\Style\Chart */ public function getStyle() { return $this->style; } }