Moodle APIs  3.8
Moodle 3.8.6 (Build: 20201109)
Public Member Functions | Public Attributes | Protected Attributes | List of all members
core\chart_axis Class Reference

Chart axis class. More...

Inheritance diagram for core\chart_axis:

Public Member Functions

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

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: