ILIAS
release_8 Revision v8.23
◀ ilDoc Overview
XAxis.php
Go to the documentation of this file.
1
<?php
2
3
declare(strict_types=1);
4
21
namespace
ILIAS\UI\Component\Chart\Bar
;
22
26
class
XAxis
extends
Axis
27
{
28
protected
const
ALLOWED_POSITIONS
= [
"bottom"
,
"top"
];
29
30
protected
string
$abbreviation
=
"x"
;
31
protected
string
$position
=
"bottom"
;
32
33
public
function
getAbbreviation
(): string
34
{
35
return
$this->abbreviation
;
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 'bottom' or 'top'."
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
}
ILIAS\UI\Component\Chart\Bar\XAxis\$position
string $position
Definition:
XAxis.php:31
ILIAS\UI\Component\Chart\Bar
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
Definition:
Axis.php:21
ILIAS\UI\Component\Chart\Bar\XAxis\getAbbreviation
getAbbreviation()
Definition:
XAxis.php:33
ILIAS\UI\Component\Chart\Bar\XAxis\withPosition
withPosition(string $position)
Should the x-axis be displayed at the bottom or at the top? Default is bottom.
Definition:
XAxis.php:44
ILIAS\UI\Component\Chart\Bar\XAxis\getPosition
getPosition()
Definition:
XAxis.php:56
ILIAS\UI\Component\Chart\Bar\XAxis
Definition:
XAxis.php:26
ILIAS\UI\Component\Chart\Bar\Axis
Definition:
Axis.php:26
ILIAS\UI\Component\Chart\Bar\XAxis\$abbreviation
string $abbreviation
Definition:
XAxis.php:30
ILIAS\UI\Component\Chart\Bar\XAxis\ALLOWED_POSITIONS
const ALLOWED_POSITIONS
Definition:
XAxis.php:28
src
UI
Component
Chart
Bar
XAxis.php
Generated on Wed Sep 3 2025 22:02:57 for ILIAS by
1.8.13 (using
Doxyfile
)