summaryrefslogtreecommitdiffstats
path: root/stats/statsaxis.h
diff options
context:
space:
mode:
authorGravatar Berthold Stoeger <bstoeger@mail.tuwien.ac.at>2021-01-06 14:17:51 +0100
committerGravatar Dirk Hohndel <dirk@hohndel.org>2021-01-06 12:31:22 -0800
commit405e6b6b693234024ae541a74cfb9733f3b8f09d (patch)
treef95b47d547c77ed492f357118b5b87071e199b99 /stats/statsaxis.h
parentab324ed769b4d39816020bf649defb61cb4bff41 (diff)
downloadsubsurface-405e6b6b693234024ae541a74cfb9733f3b8f09d.tar.gz
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>
Diffstat (limited to 'stats/statsaxis.h')
-rw-r--r--stats/statsaxis.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/stats/statsaxis.h b/stats/statsaxis.h
index 150deb087..d9fdd6b41 100644
--- a/stats/statsaxis.h
+++ b/stats/statsaxis.h
@@ -20,6 +20,7 @@ public:
virtual ~StatsAxis();
// Returns minimum and maximum of shown range, not of data points.
std::pair<double, double> minMax() const;
+ std::pair<double, double> minMaxScreen() const; // minimum and maximum in screen coordinates
double width() const; // Only supported by vertical axes. Only valid after setSize().
double height() const; // Only supported for horizontal axes. Always valid.