You are here

protected function Billboard::getType in Charts 8.4

Same name and namespace in other branches
  1. 5.0.x modules/charts_billboard/src/Plugin/chart/Library/Billboard.php \Drupal\charts_billboard\Plugin\chart\Library\Billboard::getType()

Get the chart type.

Parameters

string $chart_type: The chart type.

bool $is_polar: Whether the polar is checked.

Return value

string The chart type.

2 calls to Billboard::getType()
Billboard::populateData in modules/charts_billboard/src/Plugin/chart/Library/Billboard.php
Populate data.
Billboard::populateOptions in modules/charts_billboard/src/Plugin/chart/Library/Billboard.php
Populate options.

File

modules/charts_billboard/src/Plugin/chart/Library/Billboard.php, line 74

Class

Billboard
Define a concrete class for a Chart.

Namespace

Drupal\charts_billboard\Plugin\chart\Library

Code

protected function getType($chart_type, $is_polar = FALSE) {

  // If Polar is checked, then convert to Radar chart type.
  if ($is_polar) {
    $type = 'radar';
  }
  else {
    $type = $chart_type == 'column' ? 'bar' : $chart_type;
  }
  return $type;
}