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:
@@ -103,7 +103,11 @@ public class GnuplotFileGenerator {
|
|||||||
|
|
||||||
appendf(result, "plot ");
|
appendf(result, "plot ");
|
||||||
|
|
||||||
settings.getAggregates().addPlots(result, dataSeries);
|
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();
|
return result.toString();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -97,10 +97,6 @@ public class Plotter {
|
|||||||
});
|
});
|
||||||
METRICS_LOGGER.debug("csv generation took: " + (System.nanoTime() - start) / 1_000_000.0 + "ms");
|
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 Limit limitBy = plotSettings.getLimitBy();
|
||||||
final int limit = plotSettings.getLimit();
|
final int limit = plotSettings.getLimit();
|
||||||
DataSeries.sortAndLimit(dataSeries, limitBy, limit);
|
DataSeries.sortAndLimit(dataSeries, limitBy, limit);
|
||||||
|
|||||||
Reference in New Issue
Block a user