ILIAS  Release_5_0_x_branch Revision 61816
 All Data Structures Namespaces Files Functions Variables Groups Pages
ilChartPie Class Reference

Generator for pie charts. More...

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

Public Member Functions

 getDataInstance ($a_type=null)
 Get data series instance.
 parseGlobalOptions (stdClass $a_options)
 Convert (global) properties to flot config.
- Public Member Functions inherited from ilChart
 setSize ($a_x, $a_y)
 Set chart size.
 addData (ilChartData $a_series, $a_idx=null)
 Add data series.
 setLegend (ilChartLegend $a_legend)
 Set chart legend.
 setColors ($a_values)
 Set colors.
 getColors ()
 Get colors.
 setShadow ($a_value)
 Set shadow.
 getShadow ()
 Get shadow.
 setAutoResize ($a_value)
 Toggle auto-resizing on window resize/redraw.
 getHTML ()
 Render.

Protected Member Functions

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

Additional Inherited Members

- Static Public Member Functions inherited from ilChart
static getInstanceByType ($a_type, $a_id)
 Get type instance.
static isValidColor ($a_value)
 Validate html color code.
static renderColor ($a_value, $a_opacity=1)
 Render html color code.
- Data Fields inherited from ilChart
const TYPE_GRID = 1
const TYPE_PIE = 2
const TYPE_SPIDER = 3
- Protected Attributes inherited from ilChart
 $id
 $width
 $height
 $data
 $legend
 $shadow
 $colors
 $auto_resize

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

ilChartPie::addCustomJS ( )
protected

Add type-specific JS script.

Reimplemented from ilChart.

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

References $tpl.

{
global $tpl;
$tpl->addJavascript("Services/Chart/js/flot/jquery.flot.pie.js");
}
ilChartPie::getDataInstance (   $a_type = null)

Get data series instance.

Returns
ilChartData

Reimplemented from ilChart.

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

{
include_once "Services/Chart/classes/class.ilChartDataPie.php";
return new ilChartDataPie();
}
ilChartPie::isValidDataType ( ilChartData  $a_series)
protected

Validate data series.

Returns
bool

Reimplemented from ilChart.

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

{
return ($a_series instanceof ilChartDataPie);
}
ilChartPie::parseGlobalOptions ( stdClass  $a_options)

Convert (global) properties to flot config.

Parameters
object$a_options

Reimplemented from ilChart.

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

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

{
// if no inner labels set, use legend
if(!isset($a_options->series->pie->label) &&
!$this->legend)
{
$legend->setPosition("nw");
$this->setLegend($legend);
}
}

+ Here is the call graph for this function:


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