summaryrefslogtreecommitdiffstats
path: root/stats/statsview.cpp
diff options
context:
space:
mode:
authorGravatar Berthold Stoeger <bstoeger@mail.tuwien.ac.at>2021-01-19 11:18:10 +0100
committerGravatar bstoeger <32835590+bstoeger@users.noreply.github.com>2021-01-20 08:47:18 +0100
commitba259fb1d66c242d9503ba9695ce55826370267e (patch)
tree440524313df74c492c35d02dbcbe209abd5e3566 /stats/statsview.cpp
parentff536e98fc3e88c3c4fd769229cf901a9f272be0 (diff)
downloadsubsurface-ba259fb1d66c242d9503ba9695ce55826370267e.tar.gz
statistics: make confidence area and regression line opt-in
This is not perfect - the polygon of the confidence area is calculated even if it is not shown. Oh well. Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
Diffstat (limited to 'stats/statsview.cpp')
-rw-r--r--stats/statsview.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/stats/statsview.cpp b/stats/statsview.cpp
index e5cd0f8be..714f3ee1a 100644
--- a/stats/statsview.cpp
+++ b/stats/statsview.cpp
@@ -460,6 +460,11 @@ void StatsView::updateFeatures()
if (medianMarker)
medianMarker->setVisible(state.median);
+ if (regressionItem) {
+ regressionItem->setVisible(state.regression || state.confidence);
+ if (state.regression || state.confidence)
+ regressionItem->setFeatures(state.regression, state.confidence);
+ }
for (ChartItemPtr<QuartileMarker> &marker: quartileMarkers)
marker->setVisible(state.quartiles);
}