ILIAS  Release_4_4_x_branch Revision 61816
 All Data Structures Namespaces Files Functions Variables Groups Pages
ilChartLegend Class Reference

Chart legend. More...

+ Collaboration diagram for ilChartLegend:

Public Member Functions

 __construct ()
 Constructor.
 setPosition ($a_position)
 Set Position.
 getPosition ()
 Get Position.
 setColumns ($a_value)
 Set number of columns.
 getColumns ()
 Get number of columns.
 setMargin ($a_x, $a_y)
 Set margins.
 getMargin ()
 Get margins.
 setBackground ($a_color)
 Set background color.
 getBackground ()
 Get background color.
 setOpacity ($a_value)
 Set Opacity.
 getOpacity ()
 Get opacity.
 setLabelBorder ($a_color)
 Set label border.
 getLabelBorder ()
 Get label border.

Protected Attributes

 $position
 $columns
 $margin_x
 $margin_y
 $background
 $opacity
 $border

Detailed Description

Chart legend.

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.ilChartLegend.php.

Constructor & Destructor Documentation

ilChartLegend::__construct ( )

Constructor.

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

References setBackground(), setColumns(), setLabelBorder(), setMargin(), setOpacity(), and setPosition().

{
$this->setPosition("ne");
$this->setColumns(1);
$this->setMargin(5, 5);
$this->setBackground("#888");
$this->setOpacity(0.1);
$this->setLabelBorder("#bbb");
}

+ Here is the call graph for this function:

Member Function Documentation

ilChartLegend::getBackground ( )

Get background color.

Returns
string

Definition at line 118 of file class.ilChartLegend.php.

References $background.

{
}
ilChartLegend::getColumns ( )

Get number of columns.

Returns
int

Definition at line 73 of file class.ilChartLegend.php.

References $columns.

{
}
ilChartLegend::getLabelBorder ( )

Get label border.

Returns
string

Definition at line 165 of file class.ilChartLegend.php.

References $border.

{
return $this->border;
}
ilChartLegend::getMargin ( )

Get margins.

Returns
array (x, y)

Definition at line 95 of file class.ilChartLegend.php.

{
return array("x"=>$this->margin_x, "y"=>$this->margin_y);
}
ilChartLegend::getOpacity ( )

Get opacity.

Returns
float

Definition at line 142 of file class.ilChartLegend.php.

References $opacity.

{
}
ilChartLegend::getPosition ( )

Get Position.

Returns
string

Definition at line 53 of file class.ilChartLegend.php.

References $position.

{
}
ilChartLegend::setBackground (   $a_color)

Set background color.

Parameters
string$a_color

Definition at line 105 of file class.ilChartLegend.php.

References ilChart\isValidColor().

Referenced by __construct().

{
if(ilChart::isValidColor($a_color))
{
$this->background = $a_color;
}
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilChartLegend::setColumns (   $a_value)

Set number of columns.

Parameters
int$a_value

Definition at line 63 of file class.ilChartLegend.php.

Referenced by __construct().

{
$this->columns = (int)$a_value;
}

+ Here is the caller graph for this function:

ilChartLegend::setLabelBorder (   $a_color)

Set label border.

Parameters
string$a_color

Definition at line 152 of file class.ilChartLegend.php.

References ilChart\isValidColor().

Referenced by __construct().

{
if(ilChart::isValidColor($a_color))
{
$this->border = $a_color;
}
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilChartLegend::setMargin (   $a_x,
  $a_y 
)

Set margins.

Parameters
int$a_x
int$a_y

Definition at line 84 of file class.ilChartLegend.php.

Referenced by __construct().

{
$this->margin_x = (int)$a_x;
$this->margin_y = (int)$a_y;
}

+ Here is the caller graph for this function:

ilChartLegend::setOpacity (   $a_value)

Set Opacity.

Parameters
float$a_value

Definition at line 128 of file class.ilChartLegend.php.

Referenced by __construct().

{
$a_value = (float)$a_value;
if($a_value >= 0 && $a_value <= 1)
{
$this->opacity = $a_value;
}
}

+ Here is the caller graph for this function:

ilChartLegend::setPosition (   $a_position)

Set Position.

Parameters
string$position

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

Referenced by __construct().

{
$all = array("ne", "nw", "se", "sw");
if(in_array((string)$a_position, $all))
{
$this->position = (string)$a_position;
}
}

+ Here is the caller graph for this function:

Field Documentation

ilChartLegend::$background
protected

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

Referenced by getBackground().

ilChartLegend::$border
protected

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

Referenced by getLabelBorder().

ilChartLegend::$columns
protected

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

Referenced by getColumns().

ilChartLegend::$margin_x
protected

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

ilChartLegend::$margin_y
protected

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

ilChartLegend::$opacity
protected

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

Referenced by getOpacity().

ilChartLegend::$position
protected

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

Referenced by getPosition().


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