Hereโs a mirrored histogram that an app of mine displays:
As they say on Sesame Street, the bars of the histogram are brought to you by the letter โlโ (lower case โLโ). Iโve experimented with various exotic characters for my histogram but I ultimately returned to @Lynnโs recommendation to use the humble โlโ because it seems to work the best:
An advantage of the letter โlโ in thie mirrored histogram is that, if I select โRoboto Condensedโ as my app font, the โlโ and a single space have the same width.
Although this mirrored histogram is displayed in my app, I put it together on its Google spreadsheet. There, I set the width of the histogram in terms of the number of characters to include in a line and then, calculate the numbers of bars (ls) and spaces to use using a formula like the following:
=roundup( ( value to represent with bars / max value in data set ) * desired width of completed histogram)
The number of spaces is determined by subtracting the number of bars from the width (in characters) I have set for my histogram.
Then I used a concatenate formula with rept ( character to repeat , number of time to repeat it) formulas to build each line. Finally, I used the following to put the lines together with carriage returns:
=ARRAY_CONSTRAIN(ARRAYFORMULA(concatenate(first cell : last cell & char(10))), 1, 1)
I had one problem initially, however.
My mirrored histogram looked like this because AppSheet ignores spaces that come before characters. Hereโs the solution:
CHAR(HEX2DEC(โ200Bโ))
This unicode character is called โZERO WIDTH SPACEโ and AppSheet treats it like a normal character. So, putting this character at the beginning of each line solved my problem. (Actually, putting the character at the beginning of the first line might be enough.)
AppSheet has some cool graphic capabilities but, depending on what you are looking for, a text-based solution like this one may be your best bet.
Thatโs pretty cool!
Awesome. Thank you for sharing this @Kirk_Masden.