ILIAS  release_8 Revision v8.19
All Data Structures Namespaces Files Functions Variables Modules Pages
ilChartSpider Class Reference

This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Learning e.V. More...

+ Inheritance diagram for ilChartSpider:
+ Collaboration diagram for ilChartSpider:

Public Member Functions

 getDataInstance (int $a_type=null)
 
 setLegLabels (array $a_val)
 Set leg labels. More...
 
 getLegLabels ()
 Get leg labels. More...
 
 setYAxisMax (float $a_val)
 Set y axis max value. More...
 
 getYAxisMax ()
 Get y axis max value. More...
 
 parseGlobalOptions (stdClass $a_options)
 
- Public Member Functions inherited from ilChart
 getDataInstance (int $a_type=null)
 Get data series instance. More...
 
 setSize (string $a_x, string $a_y)
 Set chart size. More...
 
 addData (ilChartData $a_series, ?int $a_idx=null)
 Add data series. More...
 
 setLegend (ilChartLegend $a_legend)
 
 setColors (array $a_values)
 
 getColors ()
 
 setShadow (int $a_value)
 
 getShadow ()
 
 setAutoResize (bool $a_value)
 Toggle auto-resizing on window resize/redraw. More...
 
 setStacked (bool $a_value)
 
 parseGlobalOptions (stdClass $a_options)
 Convert (global) properties to flot config. More...
 
 getHTML ()
 Render. More...
 

Protected Member Functions

 isValidDataType (ilChartData $a_series)
 
 addCustomJS ()
 
- Protected Member Functions inherited from ilChart
 __construct (string $a_id)
 
 isValidDataType (ilChartData $a_series)
 Validate data series. More...
 
 isValid ()
 Basic validation. More...
 
 initJS ()
 Init JS script files. More...
 
 addCustomJS ()
 Add type-specific JS script. More...
 

Protected Attributes

array $leg_labels = array()
 
float $y_max = 0
 
- Protected Attributes inherited from ilChart
ilGlobalTemplateInterface $tpl
 
string $id = ""
 
string $width = ""
 
string $height = ""
 
array $data = []
 
ilChartLegend $legend = null
 
int $shadow = 0
 
array $colors = []
 
bool $auto_resize = false
 
bool $stacked = false
 

Additional Inherited Members

- Static Public Member Functions inherited from ilChart
static getInstanceByType (int $a_type, string $a_id)
 
static isValidColor (string $a_value)
 Validate html color code. More...
 
static renderColor (string $a_value, float $a_opacity=1)
 Render html color code. More...
 
- Data Fields inherited from ilChart
const TYPE_GRID = 1
 
const TYPE_PIE = 2
 
const TYPE_SPIDER = 3
 

Detailed Description

This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Learning e.V.

ILIAS is licensed with the GPL-3.0, see https://www.gnu.org/licenses/gpl-3.0.en.html You should have received a copy of said license along with the source code, too. If this is not the case or you just want to try ILIAS, you'll find us at: https://www.ilias.de https://github.com/ILIAS-eLearning Generator for spider charts

Author
Jörg Lützenkirchen luetz.nosp@m.enki.nosp@m.rchen.nosp@m.@lei.nosp@m.fos.c.nosp@m.om

Definition at line 20 of file class.ilChartSpider.php.

Member Function Documentation

◆ addCustomJS()

ilChartSpider::addCustomJS ( )
protected

Definition at line 72 of file class.ilChartSpider.php.

References ilChart\$tpl, and ilGlobalTemplateInterface\addJavaScript().

72  : void
73  {
74  $tpl = $this->tpl;
75 
76  $tpl->addJavaScript("Services/Chart/js/flot/jquery.flot.highlighter.js");
77  $tpl->addJavaScript("Services/Chart/js/flot/jquery.flot.spider.js");
78  }
ilGlobalTemplateInterface $tpl
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.
+ Here is the call graph for this function:

◆ getDataInstance()

ilChartSpider::getDataInstance ( int  $a_type = null)

Definition at line 25 of file class.ilChartSpider.php.

25  : ilChartData
26  {
27  return new ilChartDataSpider();
28  }
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...

◆ getLegLabels()

ilChartSpider::getLegLabels ( )

Get leg labels.

Returns
array leg labels (array of strings)

Definition at line 48 of file class.ilChartSpider.php.

References $leg_labels.

48  : array
49  {
50  return $this->leg_labels;
51  }

◆ getYAxisMax()

ilChartSpider::getYAxisMax ( )

Get y axis max value.

Returns
float y axis max value

Definition at line 67 of file class.ilChartSpider.php.

References $y_max.

Referenced by parseGlobalOptions().

67  : float
68  {
69  return $this->y_max;
70  }
+ Here is the caller graph for this function:

◆ isValidDataType()

ilChartSpider::isValidDataType ( ilChartData  $a_series)
protected

Definition at line 30 of file class.ilChartSpider.php.

30  : bool
31  {
32  return ($a_series instanceof ilChartDataSpider);
33  }
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...

◆ parseGlobalOptions()

ilChartSpider::parseGlobalOptions ( stdClass  $a_options)

Definition at line 80 of file class.ilChartSpider.php.

References getYAxisMax(), and ilChart\renderColor().

80  : void
81  {
82  $a_options->grid = new stdClass();
83  $a_options->grid->hoverable = false;
84  $a_options->grid->clickable = false;
85  $a_options->grid->ticks = $this->getYAxisMax();
86  $a_options->grid->tickColor = ilChart::renderColor("#000", "0.1");
87  $a_options->grid->mode = "spider";
88  }
getYAxisMax()
Get y axis max value.
static renderColor(string $a_value, float $a_opacity=1)
Render html color code.
+ Here is the call graph for this function:

◆ setLegLabels()

ilChartSpider::setLegLabels ( array  $a_val)

Set leg labels.

Parameters
array$a_valleg labels (array of strings)

Definition at line 39 of file class.ilChartSpider.php.

39  : void
40  {
41  $this->leg_labels = $a_val;
42  }

◆ setYAxisMax()

ilChartSpider::setYAxisMax ( float  $a_val)

Set y axis max value.

Parameters
float$a_valy axis max value

Definition at line 58 of file class.ilChartSpider.php.

58  : void
59  {
60  $this->y_max = $a_val;
61  }

Field Documentation

◆ $leg_labels

array ilChartSpider::$leg_labels = array()
protected

Definition at line 22 of file class.ilChartSpider.php.

Referenced by getLegLabels().

◆ $y_max

float ilChartSpider::$y_max = 0
protected

Definition at line 23 of file class.ilChartSpider.php.

Referenced by getYAxisMax().


The documentation for this class was generated from the following file: