mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
statistics: fix chart features: regression line and median/mean
The coordinates of these were calculated when creating the feature. This is wrong, because the min/max values of the axes can change on resize to get "nice" number. Therefore, recalculate after resizing. This means that the general "LineMarker" class has to be split into two classes, one for regression lines and one for median/mean markers. Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
This commit is contained in:
parent
ab324ed769
commit
405e6b6b69
4 changed files with 70 additions and 34 deletions
|
@ -52,6 +52,12 @@ std::pair<double, double> StatsAxis::minMax() const
|
|||
return { min, max };
|
||||
}
|
||||
|
||||
std::pair<double, double> StatsAxis::minMaxScreen() const
|
||||
{
|
||||
return horizontal ? std::make_pair(zeroOnScreen, zeroOnScreen + size)
|
||||
: std::make_pair(zeroOnScreen, zeroOnScreen - size);
|
||||
}
|
||||
|
||||
void StatsAxis::setRange(double minIn, double maxIn)
|
||||
{
|
||||
min = minIn;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue