Example 1: Creating opposite y-axis.
Let's say you want to plot two variables. Since the values of the two variables vary in range and/or type, you want to create a secondary
Example 2: Creating multi-series charts
You can add highchartTable functionality by using the UI or adding it to your custom module.
To invoke the highchartTable module in your custom module, you can use the following php snippet:
// Load highchartTable.
highcharttable_load_libs();
// Set the chart type as one of 'column', 'line', 'spline', 'area' or 'pie'.
$chart_type = 'column';
// Contextual links can be 'plain' or 'off' or an empty string (cogwheel).
$contextual_links = 'off';
// If you have only one table on your page, then 'table' should be fine as the selector.
// But if you want to target one table but not other tables on that page, use a more
// specific selector.
$table_selector = '#my-table';
$settings = array($table_selector => array(
'color-1' => 'blue',
'color-2' => 'white',
'color-3' => '#cde4f2',
'container-before' => 1,
'datalabels-enabled' => FALSE,
'height' => NULL,
'hide-table' => FALSE,
'inverted' => FALSE,
'legend-disabled' => FALSE,
'legend-layout' => 'vertical',
'subtitle-text' => 'My custom headline',
'type' => $chart_type,
'contextual-links' => $contextual_links,
));
drupal_add_js(array('highcharttable' => $settings), array('type' => 'setting'));
For a full list of settings available, see the documentation for the jquery highchartTable library.
Let's say you want to plot two variables. Since the values of the two variables vary in range and/or type, you want to create a secondary