32 $this->line_width = $a_value;
47 $this->label_radius = $a_value;
55 public function addPiePoint(
int $a_value,
string $a_caption = null): void
57 $this->data[] = array($a_value, $a_caption);
62 foreach ($this->data as $slice) {
64 $series->label = str_replace(
"\"",
"\\\"", $slice[1]);
68 $series->label .=
" (" . $slice[0] .
"%)";
71 $series->data = $slice[0];
73 $options = array(
"show" => !$this->
isHidden());
83 $a_options->series->pie =
new stdClass();
84 $a_options->series->pie->show =
true;
90 if (
$fill[
"fill"] || $width) {
91 $a_options->series->pie->stroke =
new stdClass();
93 $a_options->series->pie->stroke->width = $width;
102 $a_options->series->pie->label =
new stdClass();
103 $a_options->series->pie->label->background =
new stdClass();
104 $a_options->series->pie->radius = 1;
105 $a_options->series->pie->label->radius = $radius;
106 $a_options->series->pie->label->show =
true;
107 $a_options->series->pie->label->background->color =
"#444";
108 $a_options->series->pie->label->background->opacity = 0.8;
setLabelRadius(float $a_value)
Sets the radius at which to place the labels.
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
addPiePoint(int $a_value, string $a_caption=null)
setLineWidth(int $a_value)
parseData(array &$a_data)
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
static renderColor(string $a_value, float $a_opacity=1)
Render html color code.
parseGlobalOptions(stdClass $a_options, ilChart $a_chart)