4 include_once
"Services/Chart/classes/class.ilChartData.php";
30 $this->line_width = (int)$a_value;
53 $this->label_radius = $a_value;
64 public function addPoint($a_value, $a_caption = null)
66 $this->data[] = array($a_value, $a_caption);
71 foreach($this->data as $slice)
73 $series =
new stdClass();
74 $series->label = str_replace(
"\"",
"\\\"", $slice[1]);
79 $series->label .=
" (".$slice[0].
"%)";
82 $series->data = $slice[0];
92 public function parseGlobalOptions(stdClass $a_options,
ilChart $a_chart)
94 $a_options->series->pie =
new stdClass();
95 $a_options->series->pie->show =
true;
99 $fill = $this->getFill();
100 $width = $this->getLineWidth();
101 if($fill[
"fill"] || $width)
103 $a_options->series->pie->stroke =
new stdClass;
106 $a_options->series->pie->stroke->width = $width;
114 $radius = $this->getLabelRadius();
117 $a_options->series->pie->label =
new stdClass;
118 $a_options->series->pie->label->background =
new stdClass;
119 $a_options->series->pie->radius = 1;
120 $a_options->series->pie->label->radius = $radius;
121 $a_options->series->pie->label->show =
true;
122 $a_options->series->pie->label->background->color =
"#444";
123 $a_options->series->pie->label->background->opacity = 0.8;