function webform_charts_default_settings in Webform Charts 7
Wrapper around webform_charts_default_settings(), merging in our own settings.
2 calls to webform_charts_default_settings()
- webform_charts_edit_chart in includes/
webform_charts.pages.inc - Form callback; Display the form for editing an individual chart.
- _webform_charts_component_chart in includes/
webform_charts.pages.inc
File
- ./
webform_charts.module, line 91 - Enhances the "Analyze" section of Webform nodes with customizable charts.
Code
function webform_charts_default_settings($node, $component, $data) {
module_load_include('inc', 'charts', 'includes/charts.pages');
$data += array(
'table_header' => NULL,
);
$options = charts_default_settings();
$options = array_merge($options, array(
'type' => count($data['table_header']) || !empty($component['extra']['multiple']) ? 'column' : 'pie',
'legend' => isset($data['table_header']) ? TRUE : FALSE,
'legend_position' => 'right',
'tooltips' => TRUE,
'data_labels' => isset($data['table_header']) ? FALSE : TRUE,
'stacking' => FALSE,
));
return $options;
}