fixed minor error legend graph and value avg

This commit is contained in:
daniel 2018-09-12 15:57:22 +02:00
parent 55de76542b
commit c5b942f13f
2 changed files with 15 additions and 13 deletions

View File

@ -4155,7 +4155,7 @@ function fullscale_data (
$min_value_total = $min_value;
}
//avg sum_total
$sum_data_total += $sum_data;
$sum_data_total += $sum_data/$count_data;
//avg count_total
$count_data_total++;
@ -4203,6 +4203,7 @@ function fullscale_data (
}
}
}
$data["sum" . $series_suffix]['min'] = $min_value_total;
$data["sum" . $series_suffix]['max'] = $max_value_total;
$data["sum" . $series_suffix]['avg'] = $sum_data_total/$count_data_total;
@ -4287,7 +4288,6 @@ function fullscale_data (
$last_data = $v["datos"];
}
}
$data["sum" . $series_suffix]['min'] = $min_value;
$data["sum" . $series_suffix]['max'] = $max_value;
$data["sum" . $series_suffix]['avg'] = $sum_data/$count_data;

View File

@ -2171,10 +2171,11 @@ function pandoraFlotArea( graph_id, values, legend,
}
});
$('#'+graph_id).bind('mouseout',resetInteractivity(vconsole));
if(!vconsole){
$('#overview_'+graph_id).bind('mouseout',resetInteractivity);
$('#'+graph_id)
.bind('mouseout', resetInteractivity);
$('#overview_'+graph_id)
.bind('mouseout', resetInteractivity);
}
if(image_treshold){
@ -2218,7 +2219,7 @@ function pandoraFlotArea( graph_id, values, legend,
}
// Reset interactivity styles
function resetInteractivity(vconsole) {
function resetInteractivity() {
$('#timestamp_'+graph_id).hide();
dataset = plot.getData();
for (i = 0; i < dataset.length; ++i) {
@ -2227,15 +2228,16 @@ function pandoraFlotArea( graph_id, values, legend,
$('#legend_' + graph_id + ' .legendLabel')
.eq(i).html(label_aux);
}
$('#legend_' + graph_id + ' .legendLabel').css('color', legend_color);
$('#legend_' + graph_id + ' .legendLabel').css('font-size', font_size + 2 +'px');
$('#legend_' + graph_id + ' .legendLabel').css('font-family', font + 'Font');
$('#legend_' + graph_id + ' .legendLabel')
.css('color', legend_color);
$('#legend_' + graph_id + ' .legendLabel')
.css('font-size', font_size + 2 +'px');
$('#legend_' + graph_id + ' .legendLabel')
.css('font-family', font + 'Font');
plot.clearCrosshair();
if(!vconsole){
overview.clearCrosshair();
}
}
function yFormatter(v, axis) {
axis.datamin = 0;