function statspro_get_path_aggregated_graphs in Statistics Pro 6.2
Returns the HTML for all path aggregated graphs.
Parameters
<array> $series_names:
<array> $series_data:
Return value
<string>
1 call to statspro_get_path_aggregated_graphs()
- _statspro_path_aggregated_html_configurable_period_report in ./
statspro_path_aggregated.inc - Returns the HTML version of the configurable period report.
File
- ./
statspro_path_aggregated.inc, line 536
Code
function statspro_get_path_aggregated_graphs($series_names, $series_data) {
$output = '';
$x_labels = array();
$series_name_index = 0;
foreach ($series_names as $serie_name) {
if ($series_name_index == 0) {
// Getting the name of each aggregator.
foreach ($series_data as $serie_data) {
$x_labels[] = $serie_data[0];
}
}
else {
// Building data serie for each graph.
$title = t('Path aggregated - @title_suffix', array(
'@title_suffix' => $serie_name,
));
$serie = array();
foreach ($series_data as $serie_data) {
$serie[] = $serie_data[$series_name_index];
}
if (count($serie) != 0) {
$output .= statspro_get_pie_chart($title, array(
$serie,
), $x_labels);
}
}
$series_name_index++;
}
return $output;
}