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

Chart data bars series. More...

+ Inheritance diagram for ilChartDataBars:
+ Collaboration diagram for ilChartDataBars:

Public Member Functions

 setLineWidth ($a_value)
 Set line width.
 getLineWidth ()
 Get line width.
 setBarOptions ($a_width, $a_align="center", $a_horizontal=false)
 Set bar options.
- Public Member Functions inherited from ilChartData
 setHidden ($a_value)
 Set hidden.
 isHidden ()
 Is hidden?
 setLabel ($a_value)
 Set label.
 getLabel ()
 Get label.
 addPoint ($a_x, $a_y=null)
 Set data.
 getData ()
 Get data.
 setFill ($a_value, $a_color=null)
 Set fill.
 getFill ()
 Get fill.
 parseData (array &$a_data)
 Convert data to flot config.
 parseGlobalOptions (stdClass $a_options, ilChart $a_chart)
 Convert (global) properties to flot config.

Protected Member Functions

 getTypeString ()
 Get series type.
 parseDataOptions (array &$a_options)
 Convert data options to flot config.

Protected Attributes

 $line_width
 $bar_width
 $bar_align
 $bar_horizontal
- Protected Attributes inherited from ilChartData
 $type
 $label
 $data
 $fill
 $fill_color
 $hidden

Detailed Description

Chart data bars 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 13 of file class.ilChartDataBars.php.

Member Function Documentation

ilChartDataBars::getLineWidth ( )

Get line width.

Returns
int

Definition at line 40 of file class.ilChartDataBars.php.

References $line_width.

Referenced by parseDataOptions().

{
}

+ Here is the caller graph for this function:

ilChartDataBars::getTypeString ( )
protected

Get series type.

Returns
string

Reimplemented from ilChartData.

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

{
return "bars";
}
ilChartDataBars::parseDataOptions ( array &  $a_options)
protected

Convert data options to flot config.

Parameters
array$a_options
ilChart$a_chart

Reimplemented from ilChartData.

Definition at line 62 of file class.ilChartDataBars.php.

References $bar_align, $bar_width, and getLineWidth().

{
$width = $this->getLineWidth();
if($width !== null)
{
$a_options["lineWidth"] = $width;
}
if($this->bar_width)
{
$a_options["barWidth"] = $this->bar_width;
$a_options["align"] = $this->bar_align;
if($this->bar_horizontal)
{
$a_options["horizontal"] = true;
}
}
}

+ Here is the call graph for this function:

ilChartDataBars::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 52 of file class.ilChartDataBars.php.

{
$this->bar_width = (float)str_replace(",", ".", $a_width);
if(in_array((string)$a_align, array("center", "left")))
{
$this->bar_align = (string)$a_align;
}
$this->bar_horizontal = (bool)$a_horizontal;
}
ilChartDataBars::setLineWidth (   $a_value)

Set line width.

Parameters
int$a_value

Definition at line 30 of file class.ilChartDataBars.php.

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

Field Documentation

ilChartDataBars::$bar_align
protected

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

Referenced by parseDataOptions().

ilChartDataBars::$bar_horizontal
protected

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

ilChartDataBars::$bar_width
protected

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

Referenced by parseDataOptions().

ilChartDataBars::$line_width
protected

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

Referenced by getLineWidth().


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