Data precision... (Added to js value in graphs)

This commit is contained in:
Arturo Gonzalez 2016-10-18 17:02:13 +02:00
parent a2f9b85970
commit 43c51ac50e
2 changed files with 2 additions and 2 deletions

View File

@ -1737,10 +1737,9 @@ function pandoraFlotArea(graph_id, values, labels, labels_long, legend,
// The graphs of points type and unknown graphs will dont be updated
if (serie_types[i] != 'points' && series.label != $('#hidden-unknown_text').val()) {
$('#legend_' + graph_id + ' .legendLabel')
.eq(i).text(label_aux.replace(/=.*/,
'= ' + parseFloat(y).toFixed(2) + ' ' + unit));
'= ' + parseFloat(y).toFixed(precision_graph) + ' ' + unit));
}
$('#legend_' + graph_id + ' .legendLabel')

View File

@ -58,6 +58,7 @@ function include_javascript_dependencies_flot_graph($return = false) {
ui_get_full_url($metaconsole_hack . '/include/graphs/flot/pandora.flot.js') .'"></script>';
$output .= "
<script type='text/javascript'>
var precision_graph = " . $config['graph_precision'] . ";
function pieHover(event, pos, obj)
{
if (!obj)