ILIAS  release_5-4 Revision v5.4.26-12-gabc799a52e6
ilChartPie Class Reference

Generator for pie charts. More...

+ Inheritance diagram for ilChartPie:
+ Collaboration diagram for ilChartPie:

Public Member Functions

 getDataInstance ($a_type=null)
 
 parseGlobalOptions (stdClass $a_options)
 
- Public Member Functions inherited from ilChart
 getDataInstance ($a_type=null)
 Get data series instance. More...
 
 setSize ($a_x, $a_y)
 Set chart size. More...
 
 addData (ilChartData $a_series, $a_idx=null)
 Add data series. More...
 
 setLegend (ilChartLegend $a_legend)
 Set chart legend. More...
 
 setColors ($a_values)
 Set colors. More...
 
 getColors ()
 Get colors. More...
 
 setShadow ($a_value)
 Set shadow. More...
 
 getShadow ()
 Get shadow. More...
 
 setAutoResize ($a_value)
 Toggle auto-resizing on window resize/redraw. More...
 
 setStacked ($a_value)
 Toggle stacking. More...
 
 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 ($a_id)
 Constructor. More...
 
 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 ($a_type, $a_id)
 Get type instance. More...
 
static isValidColor ($a_value)
 Validate html color code. More...
 
static renderColor ($a_value, $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
 $tpl
 
 $id
 
 $width
 
 $height
 
 $data
 
 $legend
 
 $shadow
 
 $colors
 
 $auto_resize
 
 $stacked
 

Detailed Description

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
Version
$Id$

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

Member Function Documentation

◆ addCustomJS()

ilChartPie::addCustomJS ( )
protected

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

References ilChart\$tpl.

27  {
28  $tpl = $this->tpl;
29 
30  $tpl->addJavascript("Services/Chart/js/flot/jquery.flot.pie.js");
31  }

◆ getDataInstance()

ilChartPie::getDataInstance (   $a_type = null)

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

16  {
17  include_once "Services/Chart/classes/class.ilChartDataPie.php";
18  return new ilChartDataPie();
19  }
Chart data pie series.

◆ isValidDataType()

ilChartPie::isValidDataType ( ilChartData  $a_series)
protected

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

22  {
23  return ($a_series instanceof ilChartDataPie);
24  }
Chart data pie series.

◆ parseGlobalOptions()

ilChartPie::parseGlobalOptions ( stdClass  $a_options)

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

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

34  {
35  // if no inner labels set, use legend
36  if (!isset($a_options->series->pie->label) &&
37  !$this->legend) {
38  $legend = new ilChartLegend();
39  $legend->setPosition("nw");
40  $this->setLegend($legend);
41  }
42  }
Chart legend.
setLegend(ilChartLegend $a_legend)
Set chart legend.
+ Here is the call graph for this function:

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