3 declare(strict_types=1);
23 $f = $DIC->ui()->factory();
24 $df = new \ILIAS\Data\Factory();
28 $c_dimension = $df->dimension()->cardinal();
31 $dataset = $df->dataset([
32 "Dataset 1" => $c_dimension,
33 "Dataset 2" => $c_dimension,
34 "Dataset 3" => $c_dimension,
37 $dataset = $dataset->withPoint(
45 $dataset = $dataset->withPoint(
53 $dataset = $dataset->withPoint(
64 $b1 = $b1->withColor($df->color(
"#12436D"));
66 $b2 = $b2->withColor($df->color(
"#28A197"));
68 $b3 = $b3->withColor($df->color(
"#801650"));
77 $bar =
$f->chart()->bar()->vertical(
78 "A vertical bar chart",
82 $bar =
$bar->withTitleVisible(
false);
83 $bar =
$bar->withLegendPosition(
"left");
84 $y_axis =
new YAxis();
85 $y_axis = $y_axis->withPosition(
"right");
86 $y_axis = $y_axis->withStepSize(10);
87 $y_axis = $y_axis->withBeginAtZero(
false);
88 $bar =
$bar->withCustomYAxis($y_axis);
custom()
expected output: > ILIAS shows a base column-chart but customized.