function statspro_get_default_charting_option in Statistics Pro 6.2
Returns the available charting option that should be used as default.
Return value
<string>
1 call to statspro_get_default_charting_option()
- statspro_get_current_charting_option in ./
statspro_graphs.inc - Returns the charting option to be used.
File
- ./
statspro_graphs.inc, line 14 - Graphs generation help.
Code
function statspro_get_default_charting_option() {
static $default = NULL;
if ($default === NULL) {
$default = '';
$default_charting_libraries_per_preference = array(
'bluff' => 'charts_graphs_bluff',
'google_charts' => 'charts_graphs_google_charts',
'open-flash' => 'charts_graphs_open_flash',
'amcharts' => 'charts_graphs_amcharts',
);
foreach ($default_charting_libraries_per_preference as $default_charting_library => $module_id) {
if (module_exists($module_id)) {
$default = $default_charting_library;
break;
}
}
}
return $default;
}