feat: category chart as a share of the month, with names and a back button - #19
Merged
Merged
Conversation
…own back button The horizontal bars were measured against the largest category while the row labelled the budget usage percentage, so a "3 %" category could be drawn almost halfway across the image. Bars are now a share of the total they are given (HorizontalBars(entries, total)), every row shares one scale, and the label carries the amount with that same share. The budget detail stays in the numbered legend under the chart. Drawing the category name needed letters: BitmapFont gained A-Z, a-z and the punctuation a name needs, folds accents (a 5x7 glyph cannot hold a diacritic) and truncates what does not fit with "..". The p, q, g and y glyphs were also reseated on the x-height band, where "queso" used to read as "9ueso". Icons and other scripts still leave a blank, which is why the exact name keeps its place in the caption. The breakdown chooser ends in a back row that hands off to the summary, so the screen has an exit besides the persistent menu, even when the month has no movements.
Comment on lines
+97
to
+103
| foreach (var character in decomposed) | ||
| { | ||
| if (CharUnicodeInfo.GetUnicodeCategory(character) != UnicodeCategory.NonSpacingMark) | ||
| { | ||
| builder.Append(character); | ||
| } | ||
| } |
| /// <param name="total"> | ||
| /// What the bars are a share of: 100 % fills a row, so a 3 % category is 3 % of the row. | ||
| /// </param> | ||
| public static byte[] HorizontalBars(IReadOnlyList<ChartEntry> entries, long total) => |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
$gasto (share %)at the right, with the bar underneath; all rows share one scale, so two bars are directly comparable. The budget detail ($gastado de $presupuesto (uso %)) stays in the numbered legend in the caption.BitmapFontgainedA-Z,a-zand the punctuation a name needs, folds accents before drawing (á→a, because a 5x7 glyph cannot hold a diacritic) and addsTruncate, which cuts a name that does not fit and marks the cut with... Thep,q,gandyglyphs were reseated on the x-height band —quesoused to read as9ueso. Icons and other scripts still leave a blank, which is why the exact name keeps its place in the caption.↩️ Volverrow that hands off to the summary (catdetail:summary), so the screen has an exit besides the persistent menu — also when the month has no movements.Why
Two issues reported against the summary/statistics flows:
No message keys were added: the back row reuses
Buttons.Back.How to test
Manual, over Telegram:
Checklist
Truncate, chooser back row and its handoff).long) and dates are calendar dates where relevant..envvalues are committed.AGENTS.md,docs/) updated if behavior or conventions changed.