ChartData.php in Charts 8.3
File
modules/charts_billboard/src/Settings/Billboard/ChartData.php
View source
<?php
namespace Drupal\charts_billboard\Settings\Billboard;
class ChartData implements \JsonSerializable {
private $columns = [];
private $type;
private $labels = TRUE;
private $x = 'x';
private $groups = '';
private $xs;
public function getX() {
return $this->x;
}
public function setX($x) {
$this->x = $x;
}
public function getColumns() {
return $this->columns;
}
public function setColumns($columns) {
$this->columns = $columns;
}
public function getType() {
return $this->type;
}
public function setType($type) {
$this->type = $type;
}
public function getLabels() {
return $this->labels;
}
public function setLabels($labels) {
$this->labels = $labels;
}
public function getGroups() {
return $this->groups;
}
public function setGroups($groups) {
$this->groups = $groups;
}
public function getXs() {
return $this->xs;
}
public function setXs($xs) {
$this->xs = $xs;
}
public function jsonSerialize() {
$vars = get_object_vars($this);
if ($vars['type'] == 'pie' || $vars['type'] == 'donut') {
unset($vars['x']);
}
return $vars;
}
}