Fixed problems with thresholded in interactive graphs. Internal Ticket: #3777

This commit is contained in:
m-lopez-f 2016-08-29 12:35:27 +02:00
parent 0e53477fa7
commit 794275a13c
1 changed files with 9 additions and 1 deletions

View File

@ -2084,6 +2084,14 @@ function pandoraFlotArea(graph_id, values, labels, labels_long, legend,
thresholded = true; thresholded = true;
} }
var max_draw = plot.getAxes().yaxis.datamax;
if (max_draw < red_threshold || max_draw < yellow_threshold) {
var maxim_data = (red_threshold < yellow_threshold) ? yellow_threshold : red_threshold
plot = $.plot($('#' + graph_id), data_base,
$.extend(true, {}, options, {
yaxis: {max: maxim_data},
}));
}
plot.setData(datas); plot.setData(datas);
plot.draw(); plot.draw();