Lets you add one or more series using the same method call
@param \Altamira\Series|array $seriesOrArray
@throws \UnexpectedValueException
@return \Altamira\Chart provides fluent interface
430266
public function addSeries( $seriesOrArray )
	{
	    if (! is_array( $seriesOrArray ) ) {
	        $seriesOrArray = array( $seriesOrArray );
	    }
	    
	    if ( is_array( $seriesOrArray ) ) {
	        foreach ( $seriesOrArray as $series ) 
	        {
	            if (! $series instanceof Series ) {
	                throw new \UnexpectedValueException( '\Altamira\Chart::addSeries expects a single series or an array of series instances' );
	            } 
	            $this->addSingleSeries( $series );
	        }
	    }
	    
	    return $this;
	}
308676
public function setIntegerValue($integerValue)
    {
        if (\is_array($integerValue) || \is_object($integerValue)) {
            $m = "Invalid value type for attribute {$this->getFamilyCode()}.{$this->getAttributeCode()}, ";
            $m .= 'expecting integer, got '.gettype($integerValue);
            throw new \UnexpectedValueException($m);
        }
        $this->integerValue = null === $integerValue ? null : (int) $integerValue;

        return $this;
    }
120468
public function setFromArray(array $data)
    {
        $data = array_intersect_key($data, $this->_data);

        foreach ($data as $columnName => $value) {
            $this->__set($columnName, $value);
        }

        return $this;
    }
207388
private static function _chartDataSeriesValues($seriesValueSet,$dataType='n') {
		$seriesVal = array();
		$formatCode = '';
		$pointCount = 0;

		foreach($seriesValueSet as $seriesValueIdx => $seriesValue) {
			switch ($seriesValueIdx) {
				case 'ptCount':
					$pointCount = self::_getAttribute($seriesValue, 'val', 'integer');
					break;
				case 'formatCode':
					$formatCode = (string) $seriesValue;
					break;
				case 'pt':
					$pointVal = self::_getAttribute($seriesValue, 'idx', 'integer');
					if ($dataType == 's') {
						$seriesVal[$pointVal] = (string) $seriesValue->v;
					} else {
						$seriesVal[$pointVal] = (float) $seriesValue->v;
					}
					break;
			}
		}

		if (empty($seriesVal)) {
			$seriesVal = NULL;
		}

		return array( 'formatCode'	=> $formatCode,
					  'pointCount'	=> $pointCount,
					  'dataValues'	=> $seriesVal
					);
	}
684870
function update() {
		$where = $this->criteria();
		$this->table->notify($this, "update", $where);
		$rowset = $this->table->update($where, $this->changes());
		if (!count($rowset)) {
			throw new \UnexpectedValueException("No row updated");
		}
		$this->data = $rowset->current()->data;
		$this->cell = array();
		return $this;
	}
1081933
protected function updateValues(&$arr, $vKey = '')
    {
        $subSum = array_flip($this->metrics);
        foreach ($arr as $k => $v) {

            if (strpos($k, '_children') === false) {

                if (isset($arr[$k . '_children']) && is_array($arr[$k . '_children'])) {
                    $this->updateValues($arr[$k . '_children'], $v);
                } else {
                    foreach ($subSum as $key => $value) {
                        $this->stackLog[$v][$key . '_sub'] = 0;
                        $this->stackLog[$v][$key . '_own'] = $this->stackLog[$v][$key . '_total'];
                    }
                }
                foreach ($subSum as $key => $value) {
                    $subSum[$key] += $this->stackLog[$v][$key . '_total'];
                }
            }
        }
        if (isset($this->stackLog[$vKey])) {
            foreach ($subSum as $key => $value) {
                $this->stackLog[$vKey][$key . '_sub'] = $subSum[$key];
                $this->stackLog[$vKey][$key . '_own'] = $this->stackLog[$vKey][$key . '_total'] - $subSum[$key];
            }
        }
    }
183000
public function addValues(array $fieldValues)
    {
        foreach ($fieldValues as $fieldName => $values) {
            $values = Arr::cast($values);
            if (null === ($field = $this->getField($fieldName))) {
                $message = "unknown field";
                $len = count($values);
                if ($len !== 1) {
                    $message .= " (encountered $len values)";
                }
                $error = new Error($message);
                $error->setName($fieldName);
                $this->addError($error);
            }
            else {
                foreach ($values as $index => $value) {
                    $field->addValue($value, $index);
                }   
            }
        }
    }
51136
public function values( array $values )
	{
		// do nothing if we get nothing
		if ( empty( $values ) )
		{
			return $this;
		}
		
		// check if the the passed array is a collection.
		// because we want to be able to insert bulk values.
		if ( !\CCArr::is_collection( $values ) )
		{
			$values = array( $values );
		}
		
		// because we could recive the arrays in diffrent order 
		// we have to sort them by their key.
		foreach( $values as $key => $value )
		{
			ksort( $value ); $values[$key] = $value;
		}
		
		// merge the new values with the existing ones.
		$this->values = array_merge( $this->values, $values ); 
		
		// return self so we can continue running the next function
		return $this;
	}
1311254
public static function pushRenderer( $renderer )
    {
        if (! in_array( 'Altamira\ChartRenderer\RendererInterface', class_implements( $renderer ) ) ) {
            throw new \UnexpectedValueException( "Renderer must be instance of or string name of a class implementing RendererInterface" );
        }

        array_push( self::$rendererChain, $renderer );
        
        return self::getInstance();
    }
1144224
public function values()
    {
        $count       = $this->count()->toNative();
        $valuesArray = new \SplFixedArray($count);

        foreach ($this->items as $key => $item) {
            $valuesArray->offsetSet($key, $item->getValue());
        }

        return new Collection($valuesArray);
    }
625832
def add_series(series)
      raise ArgumentError, "Invalid argument 'series'. Expected Series, got #{series.class}." unless series.is_a?(Series)
      # Do not add it again if the series already belongs to this instance:
      @series << series unless @associated_series[series.uid]
      @image_series << series if series.is_a?(ImageSeries) && !@associated_series[series.uid]
      @associated_series[series.uid] = series
      @associated_iseries[series.uid] = series if series.is_a?(ImageSeries)
    end
445041
public function addPoints($Values, $SerieName = "Serie1")
    {
        if (!isset($this->Data["Series"][$SerieName])) {
            $this->initialise($SerieName);
        }
        if (is_array($Values)) {
            foreach ($Values as $Value) {
                $this->Data["Series"][$SerieName]["Data"][] = $Value;
            }
        } else {
            $this->Data["Series"][$SerieName]["Data"][] = $Values;
        }

        if ($Values != VOID) {
            $StrippedData = $this->stripVOID($this->Data["Series"][$SerieName]["Data"]);
            if (empty($StrippedData)) {
                $this->Data["Series"][$SerieName]["Max"] = 0;
                $this->Data["Series"][$SerieName]["Min"] = 0;
                return 0;
            }
            $this->Data["Series"][$SerieName]["Max"] = max($StrippedData);
            $this->Data["Series"][$SerieName]["Min"] = min($StrippedData);
        }
    }
742539
public function addValues($values=array()) {
		return $this->_addOrSetValues($values, function(HtmlTR $row,$_values){$row->addValues($_values);});
	}
907354
private static function _chartDataSeriesValueSet($seriesDetail, $namespacesChartMeta, $marker = null, $smoothLine = false) {
		if (isset($seriesDetail->strRef)) {
			$seriesSource = (string) $seriesDetail->strRef->f;
			$seriesData = self::_chartDataSeriesValues($seriesDetail->strRef->strCache->children($namespacesChartMeta['c']),'s');

			return new PHPExcel_Chart_DataSeriesValues('String',$seriesSource,$seriesData['formatCode'],$seriesData['pointCount'],$seriesData['dataValues'],$marker,$smoothLine);
		} elseif (isset($seriesDetail->numRef)) {
			$seriesSource = (string) $seriesDetail->numRef->f;
			$seriesData = self::_chartDataSeriesValues($seriesDetail->numRef->numCache->children($namespacesChartMeta['c']));

			return new PHPExcel_Chart_DataSeriesValues('Number',$seriesSource,$seriesData['formatCode'],$seriesData['pointCount'],$seriesData['dataValues'],$marker,$smoothLine);
		} elseif (isset($seriesDetail->multiLvlStrRef)) {
			$seriesSource = (string) $seriesDetail->multiLvlStrRef->f;
			$seriesData = self::_chartDataSeriesValuesMultiLevel($seriesDetail->multiLvlStrRef->multiLvlStrCache->children($namespacesChartMeta['c']),'s');
			$seriesData['pointCount'] = count($seriesData['dataValues']);

			return new PHPExcel_Chart_DataSeriesValues('String',$seriesSource,$seriesData['formatCode'],$seriesData['pointCount'],$seriesData['dataValues'],$marker,$smoothLine);
		} elseif (isset($seriesDetail->multiLvlNumRef)) {
			$seriesSource = (string) $seriesDetail->multiLvlNumRef->f;
			$seriesData = self::_chartDataSeriesValuesMultiLevel($seriesDetail->multiLvlNumRef->multiLvlNumCache->children($namespacesChartMeta['c']),'s');
			$seriesData['pointCount'] = count($seriesData['dataValues']);

			return new PHPExcel_Chart_DataSeriesValues('String',$seriesSource,$seriesData['formatCode'],$seriesData['pointCount'],$seriesData['dataValues'],$marker,$smoothLine);
		}
		return null;
	}
310909
public OHLCSeries addSeries(
      String seriesName, float[] openData, float[] highData, float[] lowData, float[] closeData) {

    return addSeries(seriesName, null, openData, highData, lowData, closeData);
  }
39767
private function setDataArrayForObjectOrArray($objectOrArray)
    {
        if ($objectOrArray instanceof EntityInterface) {
            $this->getAttributesFromObjectAndSetDataArray($objectOrArray);
        }
        elseif (is_array($objectOrArray)) {
            $this->data[] = $objectOrArray;
        }
    }
1336114
protected function create_key() {
		if ( is_array( $this->data ) ) {
			$this->data[ $this->key ] = null;
		} elseif ( is_object( $this->data ) ) {
			$this->data->{$this->key} = null;
		} else {
			$type = gettype( $this->data );
			throw new UnexpectedValueException(
				"Cannot create key \"{$this->key}\" on data type {$type}"
			);
		}
	}