mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
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:
parent
1808804bab
commit
bbdd34d069
3 changed files with 10 additions and 9 deletions
|
@ -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)
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue