94        $this->pointMarker = $marker;
 
  122        if (!in_array(
$dataType, self::$dataTypeValues)) {
 
  123            throw new Exception(
'Invalid datatype for chart data series values');
 
  173        $this->pointMarker = $marker;
 
  231        if (is_array($color)) {
 
  232            foreach ($color as $colorValue) {
 
  238        $this->fillColor = $color;
 
  252        if (!preg_match(
'/^[a-f0-9]{6}$/i', $color)) {
 
  253            throw new Exception(sprintf(
'Invalid hex color for chart series (color: "%s")', $color));
 
  279        $this->lineWidth = max($minWidth, $width);
 
  291        if (count($this->dataValues) > 0) {
 
  292            return is_array(array_values($this->dataValues)[0]);
 
  306        foreach ($this->dataValues as $dataValueSet) {
 
  307            $levelCount = max($levelCount, count($dataValueSet));
 
  330        $count = count($this->dataValues);
 
  333        } elseif ($count == 1) {
 
  334            return $this->dataValues[0];
 
  357        if ($this->dataSource !== 
null) {
 
  360                $calcEngine->_calculateFormulaValue(
 
  361                    '=' . $this->dataSource,
 
  363                    $worksheet->getCell(
'A1')
 
  368                foreach ($this->dataValues as &$dataValue) {
 
  369                    if (is_string($dataValue) && !empty($dataValue) && $dataValue[0] == 
'#') {
 
  375                [$worksheet, $cellRange] = Worksheet::extractSheetTitle($this->dataSource, 
true);
 
  377                if (($dimensions[0] == 1) || ($dimensions[1] == 1)) {
 
  380                    $newArray = array_values(array_shift($newDataValues));
 
  381                    foreach ($newArray as 
$i => $newDataSet) {
 
  382                        $newArray[
$i] = [$newDataSet];
 
  385                    foreach ($newDataValues as $newDataSet) {
 
  387                        foreach ($newDataSet as $newDataVal) {
 
  388                            array_unshift($newArray[
$i++], $newDataVal);
 
  391                    $this->dataValues = $newArray;
 
  394            $this->pointCount = count($this->dataValues);
 
An exception for terminatinating execution or to throw for unit testing.
static unwrapResult($value)
Remove quotes used as a wrapper to identify string values.
static getInstance(?Spreadsheet $spreadsheet=null)
Get an instance of this class.
static flattenArray($array)
Convert a multi-dimensional array to a simple 1-dimensional array.
Helper class to manipulate cell coordinates.
static rangeDimension($pRange)
Calculate range dimension.
getDataSource()
Get Series Data Source (formula).
getPointMarker()
Get Point Marker.
setDataValues($dataValues)
Set Series Data Values.
setDataSource($dataSource)
Set Series Data Source (formula).
getDataValue()
Get the first Series Data value.
validateColor($color)
Method for validating hex color.
getFormatCode()
Get Series Format Code.
setLineWidth($width)
Set line width for the series.
setFillColor($color)
Set fill color for series.
__construct($dataType=self::DATASERIES_TYPE_NUMBER, $dataSource=null, $formatCode=null, $pointCount=0, $dataValues=[], $marker=null, $fillColor=null)
Create a new DataSeriesValues object.
refresh(Worksheet $worksheet, $flatten=true)
getPointCount()
Get Series Point Count.
getDataValues()
Get Series Data Values.
setFormatCode($formatCode)
Set Series Format Code.
setDataType($dataType)
Set Series Data Type.
isMultiLevelSeries()
Identify if the Data Series is a multi-level or a simple series.
getFillColor()
Get fill color.
const DATASERIES_TYPE_NUMBER
getLineWidth()
Get line width for series.
getDataType()
Get Series Data Type.
setPointMarker($marker)
Set Point Marker.
multiLevelCount()
Return the level count of a multi-level Data Series.
const DATASERIES_TYPE_STRING