You are here

public function ChartTrait::addLabel in Dashboards with Layout Builder 8

Same name and namespace in other branches
  1. 2.0.x src/Plugin/Dashboard/ChartTrait.php \Drupal\dashboards\Plugin\Dashboard\ChartTrait::addLabel()

Add a label.

Parameters

string $label: Label to add.

File

src/Plugin/Dashboard/ChartTrait.php, line 60

Class

ChartTrait
Trait for build a chart.

Namespace

Drupal\dashboards\Plugin\Dashboard

Code

public function addLabel($label) : void {
  $this->labels[] = $label;
}