71 public function setTicks($a_x, $a_y,
bool $a_labeled =
false): void
73 $this->ticks = array(
"x" => $a_x,
"y" => $a_y,
"labeled" => $a_labeled);
90 $this->integer_axis[
"y"] = $a_status;
98 $this->integer_axis[
"x"] = $a_status;
107 $labeled = (bool)
$ticks[
"labeled"];
109 foreach (
$ticks as $axis => $def) {
110 if (is_numeric($def) || is_array($def)) {
111 $a_options->{$axis .
"axis"} =
new stdClass();
113 if (is_numeric($def)) {
114 $a_options->{$axis .
"axis"}->ticks = $def;
115 } elseif (is_array($def)) {
116 $a_options->{$axis .
"axis"}->ticks = array();
117 foreach ($def as $idx => $value) {
119 $a_options->{$axis .
"axis"}->ticks[] = array($idx, $value);
121 $a_options->{$axis .
"axis"}->ticks[] = $value;
129 if ($this->integer_axis[
"x"] && !isset($a_options->xaxis)) {
130 $a_options->{
"xaxis"} =
new stdClass();
131 $a_options->{
"xaxis"}->tickDecimals = 0;
133 if ($this->integer_axis[
"y"] && !isset($a_options->yaxis)) {
134 $a_options->{
"yaxis"} =
new stdClass();
135 $a_options->{
"yaxis"}->tickDecimals = 0;
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...
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...
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
isValidDataType(ilChartData $a_series)
Validate data series.
__construct(string $a_id)
setYAxisToInteger(bool $a_status)
Restrict y-axis to integer values.
setXAxisToInteger(bool $a_status)
Restrict x-axis to integer values.
setTicks($a_x, $a_y, bool $a_labeled=false)
Set ticks.
parseGlobalOptions(stdClass $a_options)
Convert (global) properties to flot config.
getDataInstance(?int $a_type=null)
Get data series instance.
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
__construct(Container $dic, ilPlugin $plugin)
@inheritDoc