ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
class.ilChartSpider.php
Go to the documentation of this file.
1<?php
2
24{
25 protected array $leg_labels = array();
26 protected float $y_max = 0;
27
28 public function getDataInstance(?int $a_type = null): ilChartData
29 {
30 return new ilChartDataSpider();
31 }
32
33 protected function isValidDataType(ilChartData $a_series): bool
34 {
35 return ($a_series instanceof ilChartDataSpider);
36 }
37
42 public function setLegLabels(array $a_val): void
43 {
44 $this->leg_labels = $a_val;
45 }
46
51 public function getLegLabels(): array
52 {
53 return $this->leg_labels;
54 }
55
56
61 public function setYAxisMax(float $a_val): void
62 {
63 $this->y_max = $a_val;
64 }
65
70 public function getYAxisMax(): float
71 {
72 return $this->y_max;
73 }
74
75 protected function addCustomJS(): void
76 {
78
79 $tpl->addJavaScript("assets/js/jquery.flot.highlighter.js");
80 $tpl->addJavaScript("assets/js/jquery.flot.spider.js");
81 }
82
83 public function parseGlobalOptions(stdClass $a_options): void
84 {
85 $a_options->grid = new stdClass();
86 $a_options->grid->hoverable = false;
87 $a_options->grid->clickable = false;
88 $a_options->grid->ticks = $this->getYAxisMax();
89 $a_options->grid->tickColor = ilChart::renderColor("#000", "0.1");
90 $a_options->grid->mode = "spider";
91 }
92}
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...
addCustomJS()
Add type-specific JS script.
setLegLabels(array $a_val)
Set leg labels.
parseGlobalOptions(stdClass $a_options)
Convert (global) properties to flot config.
setYAxisMax(float $a_val)
Set y axis max value.
getLegLabels()
Get leg labels.
getYAxisMax()
Get y axis max value.
isValidDataType(ilChartData $a_series)
Validate data series.
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...
ilGlobalTemplateInterface $tpl
static renderColor(string $a_value, float $a_opacity=1)
Render html color code.
addJavaScript(string $a_js_file, bool $a_add_version_parameter=true, int $a_batch=2)
Add a javascript file that should be included in the header.