ILIAS  trunk Revision v11.0_alpha-2662-g519ff7d528f
ilChartDataBars Class Reference

This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Learning e.V. More...

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

Public Member Functions

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

Protected Member Functions

 getTypeString ()
 
 parseDataOptions (array &$a_options)
 
- Protected Member Functions inherited from ilChartData
 getTypeString ()
 
 parseDataOptions (array &$a_options)
 Convert data options to flot config. More...
 

Protected Attributes

int $line_width = null
 
float $bar_width = 0
 
string $bar_align = ""
 
bool $bar_horizontal = false
 
- Protected Attributes inherited from ilChartData
string $type = ""
 
string $label = ""
 
array $data = []
 
float $fill = 0
 
string $fill_color = ""
 
bool $hidden = false
 

Detailed Description

This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Learning e.V.

ILIAS is licensed with the GPL-3.0, see https://www.gnu.org/licenses/gpl-3.0.en.html You should have received a copy of said license along with the source code, too.

If this is not the case or you just want to try ILIAS, you'll find us at: https://www.ilias.de https://github.com/ILIAS-eLearning 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

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

Member Function Documentation

◆ getLineWidth()

ilChartDataBars::getLineWidth ( )

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

References $line_width.

Referenced by parseDataOptions().

41  : ?int
42  {
43  return $this->line_width;
44  }
+ Here is the caller graph for this function:

◆ getTypeString()

ilChartDataBars::getTypeString ( )
protected

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

31  : string
32  {
33  return "bars";
34  }

◆ parseDataOptions()

ilChartDataBars::parseDataOptions ( array &  $a_options)
protected

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

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

58  : void
59  {
60  $width = $this->getLineWidth();
61  if ($width !== null) {
62  $a_options["lineWidth"] = $width;
63  }
64 
65  if ($this->bar_width) {
66  $a_options["barWidth"] = $this->bar_width;
67  $a_options["align"] = $this->bar_align;
68  if ($this->bar_horizontal) {
69  $a_options["horizontal"] = true;
70  }
71  }
72  }
while($session_entry=$r->fetchRow(ilDBConstants::FETCHMODE_ASSOC)) return null
+ Here is the call graph for this function:

◆ setBarOptions()

ilChartDataBars::setBarOptions ( float  $a_width,
string  $a_align = "center",
bool  $a_horizontal = false 
)

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

50  : void {
51  $this->bar_width = (float) str_replace(",", ".", (string) $a_width);
52  if (in_array($a_align, array("center", "left"))) {
53  $this->bar_align = $a_align;
54  }
55  $this->bar_horizontal = $a_horizontal;
56  }

◆ setLineWidth()

ilChartDataBars::setLineWidth ( int  $a_value)

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

36  : void
37  {
38  $this->line_width = $a_value;
39  }

Field Documentation

◆ $bar_align

string ilChartDataBars::$bar_align = ""
protected

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

Referenced by parseDataOptions().

◆ $bar_horizontal

bool ilChartDataBars::$bar_horizontal = false
protected

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

◆ $bar_width

float ilChartDataBars::$bar_width = 0
protected

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

Referenced by parseDataOptions().

◆ $line_width

int ilChartDataBars::$line_width = null
protected

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

Referenced by getLineWidth().


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