protected function C3::getType in Charts 5.0.x
Same name and namespace in other branches
- 8.4 modules/charts_c3/src/Plugin/chart/Library/C3.php \Drupal\charts_c3\Plugin\chart\Library\C3::getType()
The chart type.
Parameters
string $chart_type: The chart type.
bool $is_polar: Whether polar is checked.
Return value
string Return the type.
3 calls to C3::getType()
- C3::populateAxes in modules/
charts_c3/ src/ Plugin/ chart/ Library/ C3.php - Populate axes.
- C3::populateData in modules/
charts_c3/ src/ Plugin/ chart/ Library/ C3.php - Populate data.
- C3::populateOptions in modules/
charts_c3/ src/ Plugin/ chart/ Library/ C3.php - Populate options.
File
- modules/
charts_c3/ src/ Plugin/ chart/ Library/ C3.php, line 74
Class
- C3
- Define a concrete class for a Chart.
Namespace
Drupal\charts_c3\Plugin\chart\LibraryCode
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;
}