function hook_charts_info in Charts 8
Same name and namespace in other branches
- 7.2 charts.api.php \hook_charts_info()
Provide a new charting library to the system.
Libraries provided by this function will be made available as a choice for rendering charts in the Charts interface. Any libraries specified in this hook may be used as a #chart_library property on $chart renderables.
3 functions implement hook_charts_info()
Note: this list is generated by pattern matching, so it may include some functions that are not actually implementations of this hook.
- charts_c3_charts_info in modules/
charts_c3/ charts_c3.module - Implements hook_charts_info().
- charts_google_charts_info in modules/
charts_google/ charts_google.module - Implements hook_charts_info().
- charts_highcharts_charts_info in modules/
charts_highcharts/ charts_highcharts.module - Implements hook_charts_info().
2 invocations of hook_charts_info()
- ChartsConfigForm::charts_info in src/
Form/ ChartsConfigForm.php - charts_info in includes/
charts.pages.inc - Retrieve a list of all charting libraries available.
File
- ./
charts.api.php, line 134 - Documentation on hooks provided by the Charts module.
Code
function hook_charts_info() {
$info['my_charting_library'] = array(
'label' => t('New charting library'),
// Specify a callback function which will be responsible for accepting a
// $chart renderable and printing a chart on the page.
'render' => '_my_charting_library_render',
// Specify the chart types your library is capable of providing.
'types' => array(
'area',
'bar',
'column',
'line',
'pie',
'scatter',
),
);
return $info;
}