diff --git a/pandora_console/include/ajax/visual_console_builder.ajax.php b/pandora_console/include/ajax/visual_console_builder.ajax.php index de1de94783..5ba5a4e059 100755 --- a/pandora_console/include/ajax/visual_console_builder.ajax.php +++ b/pandora_console/include/ajax/visual_console_builder.ajax.php @@ -787,24 +787,31 @@ switch ($action) { break; case 'module_graph': $values['type'] = MODULE_GRAPH; + if ($values['id_custom_graph'] > 0 ) { $values['height'] = $height_module_graph; $values['width'] = $width_module_graph; $graph_conf = db_get_row('tgraph', 'id_graph', $values['id_custom_graph']); + $graph_stacked = $graph_conf['stacked']; if ( $graph_stacked == CUSTOM_GRAPH_BULLET_CHART) { $values['height'] = 50; } elseif ($graph_stacked == CUSTOM_GRAPH_GAUGE ){ - if ( $height_module_graph < 150 ) + if ( $height_module_graph < 150 ) { $values['height'] = 150; - elseif( $height_module_graph >= 150 && $height_module_graph < 250 ) - $values['height'] = $graph_height; - elseif( $height_module_graph >= 250 ) - $values['height'] = 200; + } + elseif(($height_module_graph >= 150) + && ($height_module_graph < 250)) { + $values['height'] = $graph_conf['height']; + } + elseif( $height_module_graph >= 250 ) { + $values['height'] = 200; + } } - } else { + } + else { $values['height'] = $height_module_graph; $values['width'] = $width_module_graph; }