4 include_once
"Services/Chart/classes/class.ilChart.php";
24 parent::__construct($a_id);
34 include_once
"Services/Chart/classes/class.ilChartDataBars.php";
37 case self::DATA_POINTS:
38 include_once
"Services/Chart/classes/class.ilChartDataPoints.php";
42 case self::DATA_LINES:
43 include_once
"Services/Chart/classes/class.ilChartDataLines.php";
65 public function setTicks($a_x, $a_y, $a_labeled =
false)
67 $this->ticks =
array(
"x" => $a_x,
"y" => $a_y,
"labeled" => (
bool) $a_labeled);
87 $this->integer_axis[
"y"] = (bool) $a_status;
97 $this->integer_axis[
"x"] = (bool) $a_status;
106 $labeled = (bool)
$ticks[
"labeled"];
109 if (is_numeric(
$def) || is_array(
$def)) {
110 $a_options->{
$axis .
"axis"} =
new stdClass();
112 if (is_numeric(
$def)) {
113 $a_options->{
$axis .
"axis"}->ticks =
$def;
114 } elseif (is_array(
$def)) {
115 $a_options->{
$axis .
"axis"}->ticks =
array();
116 foreach (
$def as $idx => $value) {
118 $a_options->{
$axis .
"axis"}->ticks[] =
array($idx, $value);
120 $a_options->{
$axis .
"axis"}->ticks[] = $value;
128 if ($this->integer_axis[
"x"] && !isset($a_options->xaxis)) {
129 $a_options->{
"xaxis"} =
new stdClass();
130 $a_options->{
"xaxis"}->tickDecimals = 0;
132 if ($this->integer_axis[
"y"] && !isset($a_options->yaxis)) {
133 $a_options->{
"yaxis"} =
new stdClass();
134 $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.