ILIAS  release_8 Revision v8.19-1-g4e8f2f9140c
All Data Structures Namespaces Files Functions Variables Modules Pages
Horizontal.php
Go to the documentation of this file.
1 <?php
2 
3 declare(strict_types=1);
4 
22 
23 use ILIAS\UI\Component as C;
26 
27 class Horizontal extends Bar implements C\Chart\Bar\Horizontal
28 {
29  protected XAxis $x_axis;
30 
31  public function __construct(string $title, Dataset $dataset, array $bar_configs = [])
32  {
33  parent::__construct($title, $dataset, $bar_configs);
34  $this->x_axis = new XAxis();
35  }
36 
37  public function getIndexAxis(): string
38  {
39  return "y";
40  }
41 
42  public function withCustomXAxis(XAxis $x_axis): self
43  {
44  $clone = clone $this;
45  $clone->x_axis = $x_axis;
46  return $clone;
47  }
48 
49  public function getXAxis(): XAxis
50  {
51  return $this->x_axis;
52  }
53 }
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
Definition: Bar.php:21
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
__construct(string $title, Dataset $dataset, array $bar_configs=[])
Definition: Horizontal.php:31
__construct(Container $dic, ilPlugin $plugin)