axisX = new Axis(); $this->axisY = new Axis(); } public function __clone() { $this->axisX = clone $this->axisX; $this->axisY = clone $this->axisY; } /** * @throws UndefinedChartTypeException */ public function getType(): AbstractType { if (\is_null($this->type)) { throw new UndefinedChartTypeException(); } return $this->type; } public function setType(AbstractType $value): self { $this->type = $value; return $this; } /** * Get Axis X. */ public function getAxisX(): Axis { return $this->axisX; } /** * Get Axis Y. */ public function getAxisY(): Axis { return $this->axisY; } /** * Get OffsetX (as a fraction of the chart). */ public function getOffsetX(): float { return $this->offsetX; } /** * Set OffsetX (as a fraction of the chart). */ public function setOffsetX(float $pValue = 0): self { $this->offsetX = $pValue; return $this; } /** * Get OffsetY (as a fraction of the chart). */ public function getOffsetY(): float { return $this->offsetY; } /** * Set OffsetY (as a fraction of the chart). * * @return \PhpOffice\PhpPresentation\Shape\Chart\PlotArea */ public function setOffsetY(float $pValue = 0): self { $this->offsetY = $pValue; return $this; } /** * Get Width (as a fraction of the chart). */ public function getWidth(): float { return $this->width; } /** * Set Width (as a fraction of the chart). */ public function setWidth(int $pValue = 0): self { $this->width = $pValue; return $this; } /** * Get Height (as a fraction of the chart). */ public function getHeight(): float { return $this->height; } /** * Set Height (as a fraction of the chart). * * @return \PhpOffice\PhpPresentation\Shape\Chart\PlotArea */ public function setHeight(float $value = 0): self { $this->height = $value; return $this; } /** * Get hash code. * * @return string Hash code */ public function getHashCode(): string { return \md5((\is_null($this->type) ? 'null' : $this->type->getHashCode()) . $this->axisX->getHashCode() . $this->axisY->getHashCode() . $this->offsetX . $this->offsetY . $this->width . $this->height . __CLASS__); } /** * Hash index. * * @var int */ private $hashIndex; /** * Get hash index. * * Note that this index may vary during script execution! Only reliable moment is * while doing a write of a workbook and when changes are not allowed. * * @return int|null Hash index */ public function getHashIndex(): ?int { return $this->hashIndex; } /** * Set hash index. * * Note that this index may vary during script execution! Only reliable moment is * while doing a write of a workbook and when changes are not allowed. * * @param int $value Hash index * * @return PlotArea */ public function setHashIndex(int $value) { $this->hashIndex = $value; return $this; } }