diff --git a/pandora_console/include/chart_generator.php b/pandora_console/include/chart_generator.php index 8a1dc016ab..9f1127efca 100644 --- a/pandora_console/include/chart_generator.php +++ b/pandora_console/include/chart_generator.php @@ -194,6 +194,26 @@ if (file_exists ('languages/'.$user_language.'.mo')) { $params['background_color'] ); break; + case 'slicebar': + echo flot_slicesbar_graph ( + $params['graph_data'], + $params['period'], + $params['width'], + $params['height'], + $params['legend'], + $params['colors'], + $params['fontpath'], + $params['round_corner'], + $params['homeurl'], + $params['watermark'], + $params['adapt_key'], + $params['stat_winalse'], + $params['id_agent'], + $params['full_legend_daterray'], + $params['not_interactive'], + 1 + ); + break; default: # code... break; diff --git a/pandora_console/include/graphs/flot/pandora.flot.js b/pandora_console/include/graphs/flot/pandora.flot.js index 893a57022a..8a412dc505 100644 --- a/pandora_console/include/graphs/flot/pandora.flot.js +++ b/pandora_console/include/graphs/flot/pandora.flot.js @@ -670,7 +670,7 @@ function pandoraFlotVBars(graph_id, values, labels, labels_long, legend, colors, } function pandoraFlotSlicebar(graph_id, values, datacolor, labels, legend, acumulate_data, intervaltick, - font, font_size, separator, separator2, graph_javascript, id_agent, full_legend, not_interactive) { + font, font_size, separator, separator2, id_agent, full_legend, not_interactive) { values = values.split(separator2); labels = labels.split(separator); diff --git a/pandora_console/include/graphs/functions_flot.php b/pandora_console/include/graphs/functions_flot.php index 7f47c914a2..2a0fbafc31 100644 --- a/pandora_console/include/graphs/functions_flot.php +++ b/pandora_console/include/graphs/functions_flot.php @@ -694,6 +694,29 @@ function flot_slicesbar_graph ( global $config; + if($ttl == 2){ + $params = array( + 'graph_data' => $graph_data, + 'period' => $period, + 'width' => $width, + 'height' => $height, + 'legend' => $legend, + 'colors' => $colors, + 'fontpath' => $fontpath, + 'round_corner' => $round_corner, + 'homeurl' => $homeurl, + 'watermark' => $watermark = '', + 'adapt_key' => $adapt_key = '', + 'stat_win' => $stat_win = false, + 'id_agent' => $id_agent = 0, + 'full_legend_date' => $full_legend_date = array(), + 'not_interactive' => $not_interactive = 0, + 'ttl' => $ttl = 1 + ); + + return generator_chart_to_pdf('slicebar', $params); + } + // Get a unique identifier to graph $graph_id = uniqid('graph_'); @@ -810,7 +833,7 @@ function flot_slicesbar_graph ( // Javascript code $return .= "";