mirror of
https://github.com/pandorafms/pandorafms.git
synced 2025-07-31 01:35:36 +02:00
Fixed problems with thresholded in interactive graphs. Internal Ticket: #3777
(cherry picked from commit 794275a13c68eff20f1c8dc7fb2cb7034834b9b5)
This commit is contained in:
parent
db09b83e57
commit
d6f75b7880
@ -2061,7 +2061,15 @@ function pandoraFlotArea(graph_id, values, labels, labels_long, legend,
|
|||||||
yellow_threshold, red_threshold, extremes, red_up);
|
yellow_threshold, red_threshold, extremes, red_up);
|
||||||
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();
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user