Fixed vertical and horizontal bars when print PDF. Tiquet: #3255

This commit is contained in:
m-lopez-f 2016-01-25 09:53:05 +01:00
parent d19b77bf21
commit af8b3c6e57
3 changed files with 10 additions and 17 deletions

View File

@ -1419,7 +1419,7 @@ function graphic_combined_module ($module_list, $weight_list, $period,
$label = $labels[$module];
else
$label = $agent_name . " - " .$module_data['nombre'];
$temp[$label]['g'] = $temp_data;
$temp[$label]['g'] = round($temp_data,4);
}
break;

View File

@ -192,11 +192,10 @@ function vbar_graph($flash_chart, $chart_data, $width, $height,
$graph['water_mark'] = $water_mark_file;
$graph['font'] = $font;
$graph['font_size'] = $font_size;
$graph['force_steps'] = $force_steps;
$id_graph = serialize_in_temp($graph, null, $ttl);
return "<img src='" . $homedir . "include/graphs/functions_pchart.php?static_graph=1&graph_type=vbar&ttl=".$ttl."&id_graph=".$id_graph."'>";
return "<img src='" . $homeurl . "include/graphs/functions_pchart.php?static_graph=1&graph_type=vbar&ttl=".$ttl."&id_graph=".$id_graph."'>";
}
}

View File

@ -178,21 +178,15 @@ switch ($graph_type) {
$fine_colors = array();
// If is set fine colors we store it or set default
if (isset($colors[reset(array_keys($data_values))]['fine'])) {
$fine = $colors[reset(array_keys($data_values))]['fine'];
if ($fine === true) {
$fine = $default_fine_colors;
}
foreach ($fine as $i => $fine_color) {
$rgb_fine = html_html2rgb($fine_color);
$fine_colors[$i]['R'] = $rgb_fine[0];
$fine_colors[$i]['G'] = $rgb_fine[1];
$fine_colors[$i]['B'] = $rgb_fine[2];
$fine_colors[$i]['Alpha'] = 100;
}
$colors = array();
foreach ($colors as $i => $fine_color) {
$rgb_fine = html_html2rgb($fine_color);
$fine_colors[$i]['R'] = $rgb_fine[0];
$fine_colors[$i]['G'] = $rgb_fine[1];
$fine_colors[$i]['B'] = $rgb_fine[2];
$fine_colors[$i]['Alpha'] = 100;
}
$colors = $fine_colors;
break;
case 'progress':