title = new Title(); $this->legend = new Legend(); $this->plotArea = new PlotArea(); $this->view3D = new View3D(); // Initialize parent parent::__construct(); } public function __clone() { parent::__clone(); $this->title = clone $this->title; $this->legend = clone $this->legend; $this->plotArea = clone $this->plotArea; $this->view3D = clone $this->view3D; } /** * How missing/blank values are displayed on chart (dispBlanksAs property) * * @return string */ public function getDisplayBlankAs(): string { return $this->displayBlankAs; } /** * Get Title. * * @return Title */ public function getTitle(): Title { return $this->title; } /** * Get Legend. * * @return Legend */ public function getLegend(): Legend { return $this->legend; } /** * Get PlotArea. * * @return PlotArea */ public function getPlotArea(): PlotArea { return $this->plotArea; } /** * Get View3D. * * @return View3D */ public function getView3D(): View3D { return $this->view3D; } /** * Is the spreadsheet included for editing data ? * * @return bool */ public function hasIncludedSpreadsheet(): bool { return $this->includeSpreadsheet; } /** * Define a way to display missing/blank values (dispBlanksAs property) * * @param string $value * * @return self */ public function setDisplayBlankAs(string $value): self { if (\in_array($value, [self::BLANKAS_GAP, self::BLANKAS_SPAN, self::BLANKAS_ZERO])) { $this->displayBlankAs = $value; } return $this; } /** * Is the spreadsheet included for editing data ? * * @param bool $value * * @return self */ public function setIncludeSpreadsheet(bool $value = false): self { $this->includeSpreadsheet = $value; return $this; } /** * Get indexed filename (using image index). * * @return string */ public function getIndexedFilename(): string { return 'chart' . $this->getImageIndex() . '.xml'; } /** * Get hash code. * * @return string Hash code */ public function getHashCode(): string { return \md5(parent::getHashCode() . $this->title->getHashCode() . $this->legend->getHashCode() . $this->plotArea->getHashCode() . $this->view3D->getHashCode() . ($this->includeSpreadsheet ? 1 : 0) . __CLASS__); } }