fixed slicebar to php7
This commit is contained in:
parent
b736746e1c
commit
0a1bee92a5
|
@ -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;
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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 .= "<script type='text/javascript'>";
|
||||
$return .= "//<![CDATA[\n";
|
||||
$return .= "pandoraFlotSlicebar('$graph_id', '$values', '$datacolor', '$labels', '$legend', '$acumulate_data', $intervaltick, '$fontpath', $fontsize, '$separator', '$separator2', '', $id_agent, '$full_legend_date', $not_interactive)";
|
||||
$return .= "pandoraFlotSlicebar('$graph_id','$values','$datacolor','$labels','$legend','$acumulate_data',$intervaltick,'$fontpath',$fontsize,'$separator','$separator2',$id_agent,'$full_legend_date',$not_interactive)";
|
||||
$return .= "\n//]]>";
|
||||
$return .= "</script>";
|
||||
|
||||
|
|
Loading…
Reference in New Issue