4 include_once
"Services/Chart/classes/class.ilChart.php";
24 parent::__construct($a_id);
35 include_once
"Services/Chart/classes/class.ilChartDataBars.php";
38 case self::DATA_POINTS:
39 include_once
"Services/Chart/classes/class.ilChartDataPoints.php";
43 case self::DATA_LINES:
44 include_once
"Services/Chart/classes/class.ilChartDataLines.php";
67 public function setTicks($a_x, $a_y, $a_labeled =
false)
69 $this->ticks =
array(
"x" => $a_x,
"y" => $a_y,
"labeled" => (
bool)$a_labeled);
89 $this->integer_axis[
"y"] = (bool)$a_status;
99 $this->integer_axis[
"x"] = (bool)$a_status;
109 $labeled = (bool)
$ticks[
"labeled"];
111 foreach(
$ticks as $axis => $def)
113 if(is_numeric($def) || is_array($def))
115 $a_options->{$axis.
"axis"} =
new stdClass();
119 $a_options->{$axis.
"axis"}->ticks = $def;
121 else if(is_array($def))
123 $a_options->{$axis.
"axis"}->ticks =
array();
124 foreach($def as $idx => $value)
128 $a_options->{$axis.
"axis"}->ticks[] =
array($idx, $value);
132 $a_options->{$axis.
"axis"}->ticks[] = $value;
140 if($this->integer_axis[
"x"] && !isset($a_options->xaxis))
142 $a_options->{
"xaxis"} =
new stdClass();
143 $a_options->{
"xaxis"}->tickDecimals = 0;
145 if($this->integer_axis[
"y"] && !isset($a_options->yaxis))
147 $a_options->{
"yaxis"} =
new stdClass();
148 $a_options->{
"yaxis"}->tickDecimals = 0;
parseGlobalOptions(stdClass $a_options)
Chart data points series.
setXAxisToInteger($a_status)
Restrict x-axis to integer values.
getDataInstance($a_type=null)
Abstract Chart generator base class.
setTicks($a_x, $a_y, $a_labeled=false)
Set ticks.
setYAxisToInteger($a_status)
Restrict y-axis to integer values.
Create styles array
The data for the language used.
isValidDataType(ilChartData $a_series)
Generator for grid-based charts.
Abstract chart data series base class.