3 declare(strict_types=1);
22 $f = $DIC->ui()->factory();
23 $df = new \ILIAS\Data\Factory();
27 $c_dimension = $df->dimension()->cardinal();
30 $dataset = $df->dataset([
31 "Dataset 1.1" => $c_dimension,
32 "Dataset 1.2" => $c_dimension,
33 "Dataset 2" => $c_dimension,
35 "Grouped Dataset 1" => $df->dimension()->group(
"Dataset 1.1",
"Dataset 1.2")
38 $dataset = $dataset->withPoint(
46 $dataset = $dataset->withPoint(
54 $dataset = $dataset->withPoint(
65 $b1 = $b1->withColor($df->color(
"#12436D"));
67 $b2 = $b2->withColor($df->color(
"#28A197"));
69 $b3 = $b3->withColor($df->color(
"#801650"));
71 $g1 = $g1->withStacked(
true);
79 "Grouped Dataset 1" => $g1
83 $bar =
$f->chart()->bar()->vertical(
84 "A vertical partly stacked bar chart",
partly_stacked()
expected output: > ILIAS shows a base column-chart but with stacked bars in different colors...