You are here

public function ChartTrait::getAllowedStyles in Dashboards with Layout Builder 2.0.x

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

Get allowed styles.

Return value

array Return array keyed by type.

4 calls to ChartTrait::getAllowedStyles()
ChartTrait::setChartType in src/Plugin/Dashboard/ChartTrait.php
Add a label.
MatomoBase::buildSettingsForm in modules/dashboards_matomo/src/Plugin/Dashboard/MatomoBase.php
Build render array.
NodeStatistics::buildSettingsForm in src/Plugin/Dashboard/NodeStatistics.php
Build render array.
Submissions::buildSettingsForm in modules/dashboards_webform/src/Plugin/Dashboard/Submissions.php
Build render array.

File

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

Class

ChartTrait
Trait for build a chart.

Namespace

Drupal\dashboards\Plugin\Dashboard

Code

public function getAllowedStyles() : array {
  return [
    'line' => $this
      ->t('Lines'),
    'pie' => $this
      ->t('Pies'),
    'bar' => $this
      ->t('Bars'),
    'radar' => $this
      ->t('Radar'),
    'polarArea' => $this
      ->t('Polar area'),
    'doughnut' => $this
      ->t('Doughnut'),
    'bubble' => $this
      ->t('Bubbles'),
  ];
}