mirror of
https://github.com/pandorafms/pandorafms.git
synced 2025-07-28 00:04:37 +02:00
Data precision... (Added to js value in graphs)
This commit is contained in:
parent
a2f9b85970
commit
43c51ac50e
@ -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
|
// The graphs of points type and unknown graphs will dont be updated
|
||||||
if (serie_types[i] != 'points' && series.label != $('#hidden-unknown_text').val()) {
|
if (serie_types[i] != 'points' && series.label != $('#hidden-unknown_text').val()) {
|
||||||
|
|
||||||
$('#legend_' + graph_id + ' .legendLabel')
|
$('#legend_' + graph_id + ' .legendLabel')
|
||||||
.eq(i).text(label_aux.replace(/=.*/,
|
.eq(i).text(label_aux.replace(/=.*/,
|
||||||
'= ' + parseFloat(y).toFixed(2) + ' ' + unit));
|
'= ' + parseFloat(y).toFixed(precision_graph) + ' ' + unit));
|
||||||
}
|
}
|
||||||
|
|
||||||
$('#legend_' + graph_id + ' .legendLabel')
|
$('#legend_' + graph_id + ' .legendLabel')
|
||||||
|
@ -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>';
|
ui_get_full_url($metaconsole_hack . '/include/graphs/flot/pandora.flot.js') .'"></script>';
|
||||||
$output .= "
|
$output .= "
|
||||||
<script type='text/javascript'>
|
<script type='text/javascript'>
|
||||||
|
var precision_graph = " . $config['graph_precision'] . ";
|
||||||
function pieHover(event, pos, obj)
|
function pieHover(event, pos, obj)
|
||||||
{
|
{
|
||||||
if (!obj)
|
if (!obj)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user