summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Berthold Stoeger <bstoeger@mail.tuwien.ac.at>2021-01-03 11:19:56 +0100
committerGravatar Dirk Hohndel <dirk@hohndel.org>2021-01-03 13:56:05 -0800
commit9759d5b21a330ae2908fe91ff1533d06f6a59f4f (patch)
treeb706ad0d894ba61f2c0e0844505662fffe5e7841
parente47878cbce240473eb084ec2391b09ce353f7732 (diff)
downloadsubsurface-9759d5b21a330ae2908fe91ff1533d06f6a59f4f.tar.gz
statistics: add parentheses around percentage in horizontal bars
For better visual guidance, format labels as "count (percentage)" in horizontal bar charts. In vertical bar charts two lines are used anyway. Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
-rw-r--r--stats/statsview.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/stats/statsview.cpp b/stats/statsview.cpp
index 7df8589b9..6a12ca24d 100644
--- a/stats/statsview.cpp
+++ b/stats/statsview.cpp
@@ -287,7 +287,7 @@ static std::vector<QString> makePercentageLabels(int count, int total, bool isHo
QString countString = QString("%L1").arg(count);
QString percentageString = QString("%L1%").arg(percentage, 0, 'f', 1);
if (isHorizontal)
- return { QString("%1 %2").arg(countString, percentageString) };
+ return { QString("%1 (%2)").arg(countString, percentageString) };
else
return { countString, percentageString };
}