Fix HR Histogram x-axis

When plotting HR on a histogram we set the x-axis
to only plot within the recorded heart rate range,
but the recent patch to fix up LogY settings meant
that values are always > 0 (1e-9), resulting in the
plots rarely being adjusted correctly. This patch
fixes that.
This commit is contained in:
Mark Liversedge
2011-08-27 11:33:32 +01:00
parent f5020cd85d
commit d8642964a8

View File

@@ -422,12 +422,12 @@ PowerHist::recalc(bool force)
if (series == RideFile::hr) {
double MinX=0;
for (int i=0; i<hrArray.size(); i++) {
if (hrArray[i] > 0) {
if (hrArray[i] > 0.1) {
MinX = i;
break;
}
}
setAxisScale(xBottom, MinX, parameterValue[count + 1]);
setAxisScale(xBottom, withz ? 0 : MinX, parameterValue[count + 1]);
} else {
setAxisScale(xBottom, 0.0, parameterValue[count + 1]);
}