mirror of
https://github.com/GoldenCheetah/GoldenCheetah.git
synced 2026-02-13 08:08:42 +00:00
Fix LogY Intervals on Histogram
The LogY function for histograms was overlooked when implementing intervals. The baseline and start/end values of the interval curve needed to be set to non-zero values to match the main curve. Fixes #396.
This commit is contained in:
@@ -594,8 +594,10 @@ PowerHist::recalc()
|
||||
}
|
||||
}
|
||||
totalTime[i] = 1e-9; // nonzero to accomodate log plot
|
||||
totalTimeSelected[i] = 1e-9;
|
||||
parameterValue[i] = i * delta * binw;
|
||||
totalTime[0] = 1e-9;
|
||||
totalTimeSelected[0] = 1e-9;
|
||||
parameterValue[0] = 0;
|
||||
|
||||
// convert vectors from absolute time to percentage
|
||||
@@ -971,12 +973,14 @@ PowerHist::setlnY(bool value)
|
||||
if (lny && selected != wattsZone && selected != hrZone)
|
||||
{
|
||||
setAxisScaleEngine(yLeft, new QwtLog10ScaleEngine);
|
||||
curve->setBaseline(1e-6);
|
||||
curve->setBaseline(1e-6);
|
||||
curveSelected->setBaseline(1e-6);
|
||||
}
|
||||
else
|
||||
{
|
||||
setAxisScaleEngine(yLeft, new QwtLinearScaleEngine);
|
||||
curve->setBaseline(0);
|
||||
curve->setBaseline(0);
|
||||
curveSelected->setBaseline(0);
|
||||
}
|
||||
setYMax();
|
||||
replot();
|
||||
|
||||
Reference in New Issue
Block a user