Merge branch 'ent-5855-Problemas-graficas-gauge-y-vertical-bars' into 'develop'

Fixed errors in vartical and gauges graph

See merge request artica/pandorafms!3220
This commit is contained in:
Daniel Rodriguez 2020-05-22 13:47:54 +02:00
commit 20b08dce3b
2 changed files with 12 additions and 4 deletions

View File

@ -1989,8 +1989,8 @@ function graphic_combined_module(
$color = color_graph_array(); $color = color_graph_array();
if ($params['vconsole'] === false) { if ($params['vconsole'] === false) {
$width = 200; $new_width = 200;
$height = 200; $new_height = 200;
} else { } else {
$ratio = ((200 * ( $height / (200 * $number_elements) )) / (200 * ( $width / (200 * $number_elements)))); $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'], 'labels' => $content['style']['label'],
]; ];
$return['chart'] = '';
if ($pdf === true) { if ($pdf === true) {
$return['chart'] = '<img src="data:image/jpg;base64,'; $return['chart'] .= '<img src="data:image/jpg;base64,';
$return['chart'] .= graphic_combined_module( $return['chart'] .= graphic_combined_module(
$modules, $modules,
$params, $params,
@ -7797,11 +7798,18 @@ function reporting_custom_graph(
); );
$return['chart'] .= '" />'; $return['chart'] .= '" />';
} else { } 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, $modules,
$params, $params,
$params_combined $params_combined
); );
if ($graphs[0]['stacked'] === CUSTOM_GRAPH_VBARS) {
$return['chart'] .= '</div>';
}
} }
break; break;