fixed minor errors in legend charts

This commit is contained in:
daniel 2018-07-10 17:53:19 +02:00
parent 537ecb7564
commit fce669ae21
2 changed files with 21 additions and 25 deletions

View File

@ -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'];

View File

@ -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);
}
}