public function HighchartsHandler::postRender in Visualization API 7
Includes global Javascript required by Highcharts.
Overrides VisualizationHandlerInterface::postRender
File
- includes/
plugins/ highcharts.inc, line 120 - Library plugin for Visualization implementing support for Highcharts.
Class
- HighchartsHandler
- @file Library plugin for Visualization implementing support for Highcharts.
Code
public function postRender() {
if (!$this->addedJavascript) {
module_load_include('module', 'libraries', 'libraries');
$path = libraries_get_path('highcharts');
drupal_add_js($path . '/js/highcharts.js');
drupal_add_js(drupal_get_path('module', 'visualization') . '/js/highcharts.js', array(
'scope' => 'footer',
));
$this->addedJavascript = TRUE;
}
}