Fixed errors in vartical and gauges graph

This commit is contained in:
Daniel Barbero Martin 2020-05-20 10:00:38 +02:00
parent 09ea6fdb97
commit 14d78421a9
2 changed files with 12 additions and 4 deletions

View File

@ -1989,8 +1989,8 @@ function graphic_combined_module(
$color = color_graph_array();
if ($params['vconsole'] === false) {
$width = 200;
$height = 200;
$new_width = 200;
$new_height = 200;
} else {
$ratio = ((200 * ( $height / (200 * $number_elements) )) / (200 * ( $width / (200 * $number_elements))));

View File

@ -7788,8 +7788,9 @@ function reporting_custom_graph(
'labels' => $content['style']['label'],
];
$return['chart'] = '';
if ($pdf === true) {
$return['chart'] = '<img src="data:image/jpg;base64,';
$return['chart'] .= '<img src="data:image/jpg;base64,';
$return['chart'] .= graphic_combined_module(
$modules,
$params,
@ -7797,11 +7798,18 @@ function reporting_custom_graph(
);
$return['chart'] .= '" />';
} else {
$return['chart'] = graphic_combined_module(
if ($graphs[0]['stacked'] == CUSTOM_GRAPH_VBARS) {
$return['chart'] .= '<div style="height:'.$config['graph_image_height'].'px;">';
}
$return['chart'] .= graphic_combined_module(
$modules,
$params,
$params_combined
);
if ($graphs[0]['stacked'] === CUSTOM_GRAPH_VBARS) {
$return['chart'] .= '</div>';
}
}
break;