-
andileco authored
Enable donut option for Highcharts and Google Charts (there's still work that needs to be done to these for multiple Chart attachments). Also adds a message to the Charts API Example module if the Charts default settings have not been configured.
andileco authoredEnable donut option for Highcharts and Google Charts (there's still work that needs to be done to these for multiple Chart attachments). Also adds a message to the Charts API Example module if the Charts default settings have not been configured.
charts_highcharts.module 680 B
<?php
/**
* @file
* Charts module integration with Highcharts library.
*/
use Drupal\charts\Theme\ChartsInterface;
/**
* Implements hook_charts_info().
*/
function charts_highcharts_charts_info() {
$info['highcharts'] = [
'label' => t('Highcharts'),
'render' => '_charts_highcharts_render',
'types' => ['area', 'bar', 'column', 'donut', 'line', 'pie', 'scatter'],
'file' => 'charts_highcharts.inc',
];
return $info;
}
/**
* Implements hook_charts_type_info().
*/
function charts_highcharts_charts_type_info() {
$chart_types['donut'] = [
'label' => t('Donut'),
'axis' => ChartsInterface::CHARTS_SINGLE_AXIS,
];
return $chart_types;
}