Warning: session_start(): Session cannot be started after headers have already been sent in /home/tvrreohg/public_html/manga.php on line 13
setType($type);
$this->addSeries($categories, $values, $seriesName);
$this->style = $this->setNewStyle(new ChartStyle(), $style, true);
}
/**
* Get type.
*
* @return string
*/
public function getType()
{
return $this->type;
}
/**
* Set type.
*
* @param string $value
*/
public function setType($value): void
{
$enum = ['pie', 'doughnut', 'line', 'bar', 'stacked_bar', 'percent_stacked_bar', 'column', 'stacked_column', 'percent_stacked_column', 'area', 'radar', 'scatter'];
$this->type = $this->setEnumVal($value, $enum, 'pie');
}
/**
* Add series.
*
* @param array $categories
* @param array $values
* @param null|mixed $name
*/
public function addSeries($categories, $values, $name = null): void
{
$this->series[] = [
'categories' => $categories,
'values' => $values,
'name' => $name,
];
}
/**
* Get series.
*
* @return array
*/
public function getSeries()
{
return $this->series;
}
/**
* Get chart style.
*
* @return \PhpOffice\PhpWord\Style\Chart
*/
public function getStyle()
{
return $this->style;
}
}