ILIAS  Release_4_2_x_branch Revision 61807
 All Data Structures Namespaces Files Functions Variables Groups Pages
ilChartData Class Reference

Chart data series. More...

+ Collaboration diagram for ilChartData:

Public Member Functions

 __construct ($a_type)
 Constructor.
 setType ($a_value)
 Set type.
 getType ()
 Get type.
 setHidden ($a_value)
 Set hidden.
 isHidden ()
 Is hidden?
 isValidType ($a_value)
 Is given type valid?
 setLabel ($a_value)
 Set label.
 getLabel ()
 Get label.
 addPoint ($a_x, $a_y=null)
 Set data.
 getData ()
 Get data.
 setLineWidth ($a_value)
 Set line width.
 getLineWidth ()
 Get line width.
 setLineSteps ($a_value)
 Set line steps.
 getLineSteps ()
 Get line steps.
 setBarOptions ($a_width, $a_align="center", $a_horizontal=false)
 Set bar options.
 getBarOptions ()
 Get bar options.
 setPointRadius ($a_value)
 Set radius.
 getPointRadius ()
 Get radius.
 setFill ($a_value, $a_color=null)
 Set fill.
 getFill ()
 Get fill.

Protected Attributes

 $type
 $label
 $data
 $line_width
 $bar_width
 $bar_align
 $bar_horizontal
 $radius
 $steps
 $fill
 $fill_color
 $hidden

Detailed Description

Chart data series.

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 11 of file class.ilChartData.php.

Constructor & Destructor Documentation

ilChartData::__construct (   $a_type)

Constructor.

Parameters
string$a_type

Definition at line 31 of file class.ilChartData.php.

References setType().

{
$this->setType($a_type);
}

+ Here is the call graph for this function:

Member Function Documentation

ilChartData::addPoint (   $a_x,
  $a_y = null 
)

Set data.

Parameters
float$a_x
float$a_y

Definition at line 121 of file class.ilChartData.php.

{
if($a_y !== null)
{
$this->data[] = array($a_x, $a_y);
}
else
{
$this->data[] = $a_x;
}
}
ilChartData::getBarOptions ( )

Get bar options.

Returns
array (width, align, horizontal)

Definition at line 205 of file class.ilChartData.php.

{
return array("width" => $this->bar_width,
"align" => $this->bar_align,
"horizontal" => $this->bar_horizontal);
}
ilChartData::getData ( )

Get data.

Returns
array

Definition at line 138 of file class.ilChartData.php.

References $data.

{
return $this->data;
}
ilChartData::getFill ( )

Get fill.

Returns
array (fill, color)

Definition at line 252 of file class.ilChartData.php.

{
return array("fill"=>$this->fill, "color"=>$this->fill_color);
}
ilChartData::getLabel ( )

Get label.

Returns
string

Definition at line 110 of file class.ilChartData.php.

References $label.

{
return $this->label;
}
ilChartData::getLineSteps ( )

Get line steps.

Returns
bool

Definition at line 178 of file class.ilChartData.php.

References $steps.

{
return $this->steps;
}
ilChartData::getLineWidth ( )

Get line width.

Returns
int

Definition at line 158 of file class.ilChartData.php.

References $line_width.

{
}
ilChartData::getPointRadius ( )

Get radius.

Returns
int

Definition at line 227 of file class.ilChartData.php.

References $radius.

{
return $this->radius;
}
ilChartData::getType ( )

Get type.

Returns
string

Definition at line 54 of file class.ilChartData.php.

References $type.

{
return $this->type;
}
ilChartData::isHidden ( )

Is hidden?

Returns
bool

Definition at line 74 of file class.ilChartData.php.

References $hidden.

{
return $this->hidden;
}
ilChartData::isValidType (   $a_value)

Is given type valid?

Parameters
string$a_value
Returns
bool

Definition at line 85 of file class.ilChartData.php.

Referenced by setType().

{
$all = array("lines", "bars", "points", "pie");
if(in_array((string)$a_value, $all))
{
return true;
}
return false;
}

+ Here is the caller graph for this function:

ilChartData::setBarOptions (   $a_width,
  $a_align = "center",
  $a_horizontal = false 
)

Set bar options.

Parameters
float$a_width
string$a_align
bool$a_horizontal

Definition at line 190 of file class.ilChartData.php.

{
$this->bar_width = (float)$a_width;
if(in_array((string)$a_align, array("center", "left")))
{
$this->bar_align = (string)$a_align;
}
$this->bar_horizontal = (bool)$a_horizontal;
}
ilChartData::setFill (   $a_value,
  $a_color = null 
)

Set fill.

Parameters
float$a_value
string$a_color

Definition at line 238 of file class.ilChartData.php.

References ilChart\isValidColor().

{
$this->fill = $a_value;
if(ilChart::isValidColor($a_color))
{
$this->fill_color = $a_color;
}
}

+ Here is the call graph for this function:

ilChartData::setHidden (   $a_value)

Set hidden.

Parameters
bool$a_value

Definition at line 64 of file class.ilChartData.php.

{
$this->hidden = (bool)$a_value;
}
ilChartData::setLabel (   $a_value)

Set label.

Parameters
string$a_value

Definition at line 100 of file class.ilChartData.php.

{
$this->label = (string)$a_value;
}
ilChartData::setLineSteps (   $a_value)

Set line steps.

Parameters
bool$a_value

Definition at line 168 of file class.ilChartData.php.

{
$this->steps = (bool)$a_value;
}
ilChartData::setLineWidth (   $a_value)

Set line width.

Parameters
int$a_value

Definition at line 148 of file class.ilChartData.php.

{
$this->line_width = (int)$a_value;
}
ilChartData::setPointRadius (   $a_value)

Set radius.

Parameters
int$a_value

Definition at line 217 of file class.ilChartData.php.

{
$this->radius = (int)$a_value;
}
ilChartData::setType (   $a_value)

Set type.

Parameters
string$a_value

Definition at line 41 of file class.ilChartData.php.

References isValidType().

Referenced by __construct().

{
if($this->isValidType($a_value))
{
$this->type = (string)$a_value;
}
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

Field Documentation

ilChartData::$bar_align
protected

Definition at line 18 of file class.ilChartData.php.

ilChartData::$bar_horizontal
protected

Definition at line 19 of file class.ilChartData.php.

ilChartData::$bar_width
protected

Definition at line 17 of file class.ilChartData.php.

ilChartData::$data
protected

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

Referenced by getData().

ilChartData::$fill
protected

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

ilChartData::$fill_color
protected

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

ilChartData::$hidden
protected

Definition at line 24 of file class.ilChartData.php.

Referenced by isHidden().

ilChartData::$label
protected

Definition at line 14 of file class.ilChartData.php.

Referenced by getLabel().

ilChartData::$line_width
protected

Definition at line 16 of file class.ilChartData.php.

Referenced by getLineWidth().

ilChartData::$radius
protected

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

Referenced by getPointRadius().

ilChartData::$steps
protected

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

Referenced by getLineSteps().

ilChartData::$type
protected

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

Referenced by getType().


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