diff options
author | Berthold Stoeger <bstoeger@mail.tuwien.ac.at> | 2021-01-05 13:51:39 +0100 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2021-01-06 12:31:22 -0800 |
commit | ab324ed769b4d39816020bf649defb61cb4bff41 (patch) | |
tree | 066dfab03a5d3a370b7928d53eb0c18d96cda62e /stats/statsview.cpp | |
parent | 8dfa3f6db3eda8bce432afb7407efe2d8822ebbd (diff) | |
download | subsurface-ab324ed769b4d39816020bf649defb61cb4bff41.tar.gz |
statistics: paint custom grid
With removal of QtCharts' axes, the grid was lost. Readd it.
Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
Diffstat (limited to 'stats/statsview.cpp')
-rw-r--r-- | stats/statsview.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/stats/statsview.cpp b/stats/statsview.cpp index 394620d13..d6da093b3 100644 --- a/stats/statsview.cpp +++ b/stats/statsview.cpp @@ -6,6 +6,7 @@ #include "pieseries.h" #include "scatterseries.h" #include "statsaxis.h" +#include "statsgrid.h" #include "statsstate.h" #include "statstranslations.h" #include "statsvariables.h" @@ -118,6 +119,8 @@ void StatsView::plotAreaChanged(const QRectF &r) xAxis->setPos(QPointF(left, bottom)); } + if (grid) + grid->updatePositions(); for (auto &series: series) series->updatePositions(); for (QuartileMarker &marker: quartileMarkers) @@ -195,6 +198,8 @@ void StatsView::setAxes(StatsAxis *x, StatsAxis *y) { xAxis = x; yAxis = y; + if (x && y) + grid = std::make_unique<StatsGrid>(chart, *x, *y); } void StatsView::reset() @@ -208,6 +213,7 @@ void StatsView::reset() quartileMarkers.clear(); lineMarkers.clear(); chart->removeAllSeries(); + grid.reset(); axes.clear(); title.reset(); } |