ILIAS  release_8 Revision v8.19
All Data Structures Namespaces Files Functions Variables Modules Pages
ilChartPie 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 ilChartPie:
+ Collaboration diagram for ilChartPie:

Public Member Functions

 getDataInstance (int $a_type=null)
 
 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...
 

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
 
- 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
 

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 pie 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.ilChartPie.php.

Member Function Documentation

◆ addCustomJS()

ilChartPie::addCustomJS ( )
protected

Definition at line 32 of file class.ilChartPie.php.

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

32  : void
33  {
34  $tpl = $this->tpl;
35 
36  $tpl->addJavaScript("Services/Chart/js/flot/jquery.flot.pie.js");
37  }
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()

ilChartPie::getDataInstance ( int  $a_type = null)

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

22  : ilChartData
23  {
24  return new ilChartDataPie();
25  }
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()

ilChartPie::isValidDataType ( ilChartData  $a_series)
protected

Definition at line 27 of file class.ilChartPie.php.

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

◆ parseGlobalOptions()

ilChartPie::parseGlobalOptions ( stdClass  $a_options)

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

References ilChart\$legend, ilChart\setLegend(), and ilChartLegend\setPosition().

39  : void
40  {
41  // if no inner labels set, use legend
42  if (!isset($a_options->series->pie->label) &&
43  !$this->legend) {
44  $legend = new ilChartLegend();
45  $legend->setPosition("nw");
46  $this->setLegend($legend);
47  }
48  }
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
setPosition(string $a_position)
setLegend(ilChartLegend $a_legend)
ilChartLegend $legend
+ Here is the call graph for this function:

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