MDL-55030 core: Support min and max in axes

Part of MDL-54987 epic.
This commit is contained in:
Frederic Massart
2016-07-25 10:42:34 +01:00
committed by Dan Poltawski
parent 909c5cf207
commit 46de49dc9f
5 changed files with 52 additions and 2 deletions
+20
View File
@@ -45,6 +45,8 @@ class chart_axis implements JsonSerializable {
const POS_TOP = 'top';
protected $label = null;
protected $max = null;
protected $min = null;
protected $position = self::POS_DEFAULT;
protected $stepsize = null;
@@ -55,6 +57,14 @@ class chart_axis implements JsonSerializable {
return $this->label;
}
public function get_max() {
return $this->max;
}
public function get_min() {
return $this->min;
}
public function get_position() {
return $this->position;
}
@@ -66,6 +76,8 @@ class chart_axis implements JsonSerializable {
public function jsonSerialize() {
return [
'label' => $this->label,
'max' => $this->max,
'min' => $this->min,
'position' => $this->position,
'stepSize' => $this->stepsize,
];
@@ -75,6 +87,14 @@ class chart_axis implements JsonSerializable {
return $this->label = $label;
}
public function set_max($max) {
return $this->max = $max;
}
public function set_min($min) {
return $this->min = $min;
}
public function set_position($position) {
return $this->position = $position;
}