class ChartjsData in Charts 8.3
Class ChartjsData.
@package Drupal\charts_chartjs\Settings\Chartjs
Chart.js data options are described here:
Hierarchy
- class \Drupal\charts_chartjs\Settings\Chartjs\ChartjsData implements \Drupal\charts_chartjs\Settings\Chartjs\JsonSerializable
Expanded class hierarchy of ChartjsData
See also
http://www.chartjs.org/docs/latest/getting-started/
1 file declares its use of ChartjsData
- Chartjs.php in modules/
charts_chartjs/ src/ Plugin/ chart/ Chartjs.php
File
- modules/
charts_chartjs/ src/ Settings/ Chartjs/ ChartjsData.php, line 13
Namespace
Drupal\charts_chartjs\Settings\ChartjsView source
class ChartjsData implements \JsonSerializable {
/**
* Property that specifies the labels.
*
* @var mixed
*/
private $labels;
/**
* An object that specifies the datasets.
*
* @var mixed
*/
private $datasets;
/**
* Get Chart Axis property that specifies a title for the axis.
*
* @return mixed
* Labels.
*/
public function getLabels() {
return $this->labels;
}
/**
* Set Labels property.
*
* @param mixed $labels
* Labels.
*/
public function setLabels($labels) {
$this->labels = $labels;
}
/**
* Get an object that specifies the datasets.
*
* @return mixed
* Datasets.
*/
public function getDatasets() {
return $this->datasets;
}
/**
* Set an object that specifies the datasets.
*
* @param mixed $datasets
* Datasets.
*/
public function setDatasets($datasets) {
$this->datasets = $datasets;
}
/**
* Json Serialize.
*
* @return array
* Json Serialize.
*/
public function jsonSerialize() {
$vars = get_object_vars($this);
return $vars;
}
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
ChartjsData:: |
private | property | An object that specifies the datasets. | |
ChartjsData:: |
private | property | Property that specifies the labels. | |
ChartjsData:: |
public | function | Get an object that specifies the datasets. | |
ChartjsData:: |
public | function | Get Chart Axis property that specifies a title for the axis. | |
ChartjsData:: |
public | function | Json Serialize. | |
ChartjsData:: |
public | function | Set an object that specifies the datasets. | |
ChartjsData:: |
public | function | Set Labels property. |