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>
This commit is contained in:
Berthold Stoeger 2021-01-10 23:11:50 +01:00 committed by Dirk Hohndel
parent 1808804bab
commit bbdd34d069
3 changed files with 10 additions and 9 deletions

View file

@ -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)
};