4include_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];
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;
getTypeString()
Get series type.
parseData(array &$a_data)
Convert data to flot config.
parseGlobalOptions(stdClass $a_options, ilChart $a_chart)
Convert (global) properties to flot config.
setLabelRadius($a_value)
Sets the radius at which to place the labels.
getLineWidth()
Get line width.
setLineWidth($a_value)
Set line width.
addPoint($a_value, $a_caption=null)
Set data.
Abstract chart data series base class.
Abstract Chart generator base class.
static renderColor($a_value, $a_opacity=1)
Render html color code.
if(!is_array($argv)) $options