You are here

protected function Billboard::getType in Charts 5.0.x

Same name and namespace in other branches
  1. 8.4 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.

3 calls to Billboard::getType()
Billboard::populateAxes in modules/charts_billboard/src/Plugin/chart/Library/Billboard.php
Populate axes.
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;
}