Moodle PHP Documentation 4.5
Moodle 4.5dev (Build: 20240606) (d3ae1391abe)
core\chart_axis Class Reference

Chart axis class. More...

Inheritance diagram for core\chart_axis:

Public Member Functions

 __construct ()
 Constructor.
 
 get_label ()
 Get the label.
 
 get_labels ()
 Get the labels.
 
 get_max ()
 Get the max value.
 
 get_min ()
 Get the min value.
 
 get_position ()
 Get the axis position.
 
 get_stepsize ()
 Get the step size.
 
 jsonSerialize ()
 Serialize the object.
 
 set_label ($label)
 Set the label.
 
 set_labels ($labels)
 Set the labels.
 
 set_max ($max)
 Set the max value.
 
 set_min ($min)
 Set the min value.
 
 set_position ($position)
 Set the position.
 
 set_stepsize ($stepsize)
 Set the step size.
 

Public Attributes

const POS_BOTTOM = 'bottom'
 Bottom axis position.
 
const POS_DEFAULT = null
 Default axis position.
 
const POS_LEFT = 'left'
 Left axis position.
 
const POS_RIGHT = 'right'
 Right axis position.
 
const POS_TOP = 'top'
 Top axis position.
 

Protected Attributes

string $label = null
 The axis label.
 
string[] $labels = null
 The axis labels, tick values.
 
float $max = null
 The maximum tick value.
 
float $min = null
 The minimum tick value.
 
string $position = self::POS_DEFAULT
 The axis position.
 
float $stepsize = null
 The stepsize between ticks.
 

Detailed Description

Chart axis class.

License
http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later

Constructor & Destructor Documentation

◆ __construct()

core\chart_axis::__construct ( )

Constructor.

Must not take any argument.

Member Function Documentation

◆ get_label()

core\chart_axis::get_label ( )

Get the label.

Return values
string

◆ get_labels()

core\chart_axis::get_labels ( )

Get the labels.

Return values
string[]

◆ get_max()

core\chart_axis::get_max ( )

Get the max value.

Return values
float

◆ get_min()

core\chart_axis::get_min ( )

Get the min value.

Return values
float

◆ get_position()

core\chart_axis::get_position ( )

Get the axis position.

Return values
string

◆ get_stepsize()

core\chart_axis::get_stepsize ( )

Get the step size.

Return values
float

◆ jsonSerialize()

core\chart_axis::jsonSerialize ( )

Serialize the object.

Return values
array

◆ set_label()

core\chart_axis::set_label ( $label)

Set the label.

Parameters
string$labelThe label.

◆ set_labels()

core\chart_axis::set_labels ( $labels)

Set the labels.

Parameters
string[]$labelsThe labels.

◆ set_max()

core\chart_axis::set_max ( $max)

Set the max value.

Parameters
float$maxThe max value.

◆ set_min()

core\chart_axis::set_min ( $min)

Set the min value.

Parameters
float$minThe min value.

◆ set_position()

core\chart_axis::set_position ( $position)

Set the position.

Parameters
string$positionUse constant self\POS_*.

◆ set_stepsize()

core\chart_axis::set_stepsize ( $stepsize)

Set the step size.

Parameters
float$stepsizeThe step size.

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