Don't draw an e-r graph if no data
If there are no data for a bug query, just don't try to draw the graph. Apparently the flot lib had a recent change which breaks drawing graphs with no data. This seems like a sensible idea anyway. Instead the string "No matches" is substituted for the graph. Change-Id: I3733974a9ec180fef2ca74c5e799155cadd07b7d
This commit is contained in:
parent
b266a26a98
commit
35816b5802
@ -40,11 +40,15 @@ function update() {
|
||||
}
|
||||
div = div.find(".graph");
|
||||
|
||||
$.plot(div, bug['data'],
|
||||
{xaxis: {
|
||||
mode: "time"
|
||||
}}
|
||||
);
|
||||
if (bug['data'].length > 0) {
|
||||
$.plot(div, bug['data'],
|
||||
{xaxis: {
|
||||
mode: "time"
|
||||
}}
|
||||
);
|
||||
} else {
|
||||
div.html("No matches");
|
||||
}
|
||||
|
||||
});
|
||||
$.each($('.bug-container'), function(i, container) {
|
||||
|
Loading…
Reference in New Issue
Block a user