/** * @return GoogleLineChart **/ public function addLine(GoogleChartLine $line) { $this->color->addColor($line->getColor()); $this->legend->addItem($line->getTitle()); $this->data->addDataSet($line->getValue()); if ($style = $line->getStyle()) { $this->style->addStyle($style); } if ($labelStyle = $line->getLabelStyle()) { $this->labelStyle->addStyle($labelStyle->setDataSetIndex($this->data->getCount() - 1)); } return $this; }