MDL-55031 core: Series color was not being exported
Part of MDL-54987 epic.
This commit is contained in:
committed by
Dan Poltawski
parent
299e9aba66
commit
8bc4583fc6
@@ -40,6 +40,7 @@ class chart_series implements JsonSerializable {
|
||||
const TYPE_DEFAULT = null;
|
||||
const TYPE_LINE = 'line';
|
||||
|
||||
protected $color;
|
||||
protected $label;
|
||||
protected $type = self::TYPE_DEFAULT;
|
||||
protected $values = [];
|
||||
@@ -49,6 +50,10 @@ class chart_series implements JsonSerializable {
|
||||
$this->label = $label;
|
||||
}
|
||||
|
||||
public function get_color() {
|
||||
return $this->color;
|
||||
}
|
||||
|
||||
public function get_count() {
|
||||
return count($this->values);
|
||||
}
|
||||
@@ -69,7 +74,8 @@ class chart_series implements JsonSerializable {
|
||||
$data = [
|
||||
'label' => $this->label,
|
||||
'type' => $this->type,
|
||||
'values' => $this->values
|
||||
'values' => $this->values,
|
||||
'color' => $this->color,
|
||||
];
|
||||
return $data;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user