render images without any data on it instead of throwing errors
This makes it easier to use the mouse wheel to zoom in. Without it you could zoom into a region that had not data and then had to use the date picker to change the date.
This commit is contained in:
@@ -105,6 +105,10 @@ public class GnuplotFileGenerator {
|
||||
|
||||
settings.getAggregates().addPlots(result, dataSeries);
|
||||
|
||||
// Add a plot outside of the visible range. Without this gnuplot would not
|
||||
// render images when there are not data points on it.
|
||||
appendf(result, "-1 with lines notitle");
|
||||
|
||||
return result.toString();
|
||||
}
|
||||
|
||||
|
||||
@@ -97,10 +97,6 @@ public class Plotter {
|
||||
});
|
||||
METRICS_LOGGER.debug("csv generation took: " + (System.nanoTime() - start) / 1_000_000.0 + "ms");
|
||||
|
||||
if (dataSeries.isEmpty()) {
|
||||
throw new NoDataPointsException();
|
||||
}
|
||||
|
||||
final Limit limitBy = plotSettings.getLimitBy();
|
||||
final int limit = plotSettings.getLimit();
|
||||
DataSeries.sortAndLimit(dataSeries, limitBy, limit);
|
||||
|
||||
Reference in New Issue
Block a user