diff --git a/pandora_console/include/functions.php b/pandora_console/include/functions.php index 3de5a2c36c..183c2ab6ae 100644 --- a/pandora_console/include/functions.php +++ b/pandora_console/include/functions.php @@ -4050,7 +4050,7 @@ function series_type_graph_array($data, $show_elements_graph) $name_legend .= ' * '.$value['weight'].') '; } - $data_return['legend'][$key] = $name_legend; + $data_return['legend'][$key] = ''.$name_legend.''; if ((int) $value['min'] === PHP_INT_MAX) { $value['min'] = 0; } @@ -4059,28 +4059,28 @@ function series_type_graph_array($data, $show_elements_graph) $value['max'] = 0; } - $data_return['legend'][$key] .= __('Min:').remove_right_zeros( + $data_return['legend'][$key] .= ''.__('Min').''.remove_right_zeros( number_format( $value['min'], $config['graph_precision'], $config['csv_decimal_separator'], $config['csv_decimal_separator'] == ',' ? '.' : ',' ) - ).' '.__('Max:').remove_right_zeros( + ).' '.__('Max').''.remove_right_zeros( number_format( $value['max'], $config['graph_precision'], $config['csv_decimal_separator'], $config['csv_decimal_separator'] == ',' ? '.' : ',' ) - ).' '._('Avg:').remove_right_zeros( + ).' '._('Avg').''.remove_right_zeros( number_format( $value['avg'], $config['graph_precision'], $config['csv_decimal_separator'], $config['csv_decimal_separator'] == ',' ? '.' : ',' ) - ).' '.$str; + ).' '.$str; if ($show_elements_graph['compare'] == 'overlapped' && $key == 'sum2' diff --git a/pandora_console/include/graphs/functions_flot.php b/pandora_console/include/graphs/functions_flot.php index 9ea3abda95..1ee377f290 100644 --- a/pandora_console/include/graphs/functions_flot.php +++ b/pandora_console/include/graphs/functions_flot.php @@ -272,6 +272,11 @@ function flot_area_graph( style=' width: ".$params['width'].'px; height: '.$params['height']."px;'>"; + $legend_top = 10; + if (empty($params['show_legend']) === false) { + $legend_top = (int) $params['height']; + } + if ($params['menu']) { $params['height'] = 100; } else { @@ -280,13 +285,9 @@ function flot_area_graph( if ((bool) $params['vconsole'] === false) { $return .= '
'; - $legend_top = 10; - if (empty($params['show_legend']) === false) { - $legend_top = (20 + (count($legend) * 18)); - } if ($water_mark != '' && (bool) $params['dashboard'] === false) { - $return .= '