diff options
author | Berthold Stoeger <bstoeger@mail.tuwien.ac.at> | 2021-01-10 23:11:50 +0100 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2021-01-10 14:45:12 -0800 |
commit | bbdd34d06927b57ef955eeec8578e2d85957002b (patch) | |
tree | 7721fb01e8fef2dca85b7aaa28e452808f37a76c /stats/boxseries.cpp | |
parent | 1808804babb7d7f00e798236df16bbef58114a38 (diff) | |
download | subsurface-bbdd34d06927b57ef955eeec8578e2d85957002b.tar.gz |
statistics: add count to box and whisker plots
When calculating the quartiles, we need the count of dives
anyway, which makes it trivial to export this value to
the frontend.
Fixes an erroneous "mean", which should be "median".
Suggested-by: Peter Zaal <peter.zaal@gmail.com>
Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
Diffstat (limited to 'stats/boxseries.cpp')
-rw-r--r-- | stats/boxseries.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/stats/boxseries.cpp b/stats/boxseries.cpp index b5e4422ea..805e8cc8e 100644 --- a/stats/boxseries.cpp +++ b/stats/boxseries.cpp @@ -119,11 +119,11 @@ std::vector<QString> BoxSeries::formatInformation(const Item &item) const { QLocale loc; return { - item.binName, + StatsTranslations::tr("%1 (%2 dives)").arg(item.binName, loc.toString(item.q.count)), QStringLiteral("%1:").arg(variable), infoItem(StatsTranslations::tr("min"), unit, decimals, item.q.min), infoItem(StatsTranslations::tr("Q1"), unit, decimals, item.q.q1), - infoItem(StatsTranslations::tr("mean"), unit, decimals, item.q.q2), + infoItem(StatsTranslations::tr("median"), unit, decimals, item.q.q2), infoItem(StatsTranslations::tr("Q3"), unit, decimals, item.q.q3), infoItem(StatsTranslations::tr("max"), unit, decimals, item.q.max) }; |