ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
YAxis.php
Go to the documentation of this file.
1<?php
2
19declare(strict_types=1);
20
22
26class YAxis extends Axis
27{
28 protected const ALLOWED_POSITIONS = ["left", "right"];
29
30 protected string $abbreviation = "y";
31 protected string $position = "left";
32
33 public function getAbbreviation(): string
34 {
36 }
37
44 public function withPosition(string $position): self
45 {
46 if (!in_array($position, self::ALLOWED_POSITIONS)) {
47 throw new \InvalidArgumentException(
48 "Position must be 'left' or 'right'."
49 );
50 }
51 $clone = clone $this;
52 $clone->position = $position;
53 return $clone;
54 }
55
56 public function getPosition(): string
57 {
58 return $this->position;
59 }
60}
withPosition(string $position)
Should the y-axis be displayed left or right? Default is left.
Definition: YAxis.php:44