mirror of
https://github.com/subsurface/subsurface.git
synced 2025-01-19 14:25:27 +00:00
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>
This commit is contained in:
parent
e47878cbce
commit
9759d5b21a
1 changed files with 1 additions and 1 deletions
|
@ -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 };
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue