diff --git a/pandora_console/include/functions.php b/pandora_console/include/functions.php index 95892d211a..7af3256453 100644 --- a/pandora_console/include/functions.php +++ b/pandora_console/include/functions.php @@ -3117,29 +3117,25 @@ function series_type_graph_array($data, $show_elements_graph){ } } - if(($show_elements_graph['fullscale'] || - $show_elements_graph['type_mode_graph'] ) && - strpos($key, 'baseline') === false ){ - $data_return['legend'][$key] .= - __('Min:') . remove_right_zeros( - number_format( - $value['min'], - $config['graph_precision'] - ) - ) . ' ' . - __('Max:') . remove_right_zeros( - number_format( - $value['max'], - $config['graph_precision'] - ) - ) . ' ' . - _('Avg:') . remove_right_zeros( - number_format( - $value['avg'], - $config['graph_precision'] - ) - ) . ' ' . $str; - } + $data_return['legend'][$key] .= + __('Min:') . remove_right_zeros( + number_format( + $value['min'], + $config['graph_precision'] + ) + ) . ' ' . + __('Max:') . remove_right_zeros( + number_format( + $value['max'], + $config['graph_precision'] + ) + ) . ' ' . + _('Avg:') . remove_right_zeros( + number_format( + $value['avg'], + $config['graph_precision'] + ) + ) . ' ' . $str; if($show_elements_graph['compare'] == 'overlapped' && $key == 'sum2'){ $data_return['color'][$key] = $color_series['overlapped']; diff --git a/pandora_console/include/graphs/flot/pandora.flot.js b/pandora_console/include/graphs/flot/pandora.flot.js index ff5882b9df..226d911d6d 100644 --- a/pandora_console/include/graphs/flot/pandora.flot.js +++ b/pandora_console/include/graphs/flot/pandora.flot.js @@ -2026,13 +2026,13 @@ function pandoraFlotArea( graph_id, values, legend, avg_bigger = ""; } - data_legend[index] = + data_legend[index] = ' Min: ' + (short_data ? number_format(min_y, 0, "", short_data) : parseFloat(min_y)) + min_bigger + ' Max: ' + (short_data ? number_format(max_y, 0, "", short_data) : parseFloat(max_y)) + max_bigger + ' Avg: ' + (short_data ? number_format(avg_y, 0, "", short_data) : parseFloat(avg_y)) + avg_bigger; }); - var label_aux = legend[series.label] + data_legend[series.label]; + var label_aux = legend[series.label].split(":")[0] + data_legend[series.label]; $('#legend_' + graph_id + ' .legendLabel').eq(i).html(label_aux); } }