Sparklines.
It shows the littlest detail, while at the same time lets you step back and see the forest for the trees (or the trend from the data). I'm worried I've found the golden hammer and will forever reduce every problem ahead of me into a nail, but it seems in this case to be a good fit.
At the same time, I'm also trying to refine my rendering of these things. The original method with an entire <TABLE> in every cell was a little heavy handed and of course didn't work at all on my phone. For the example up above, several of the strips are just single height bars of different colors which I was able to do with <TD> blocks using width and color control in the TD tag. Even creating the entire strip ends up being child's play in perl:
I even got more daring, and did some variable height stuff using rowspan. The tick marks under the graphs are a trivial example. You want something like this:$chrt .= " Where $h->{$_} contains the array reference for one strip, and $color[$_] contains the color for the integer value at that point. Could have used names in the hash array, and a hash for the colors, but several years of assembly programming back in ancient times still leave their mark on me today.". join('', map { " " } map { $_ || 0 } @{$h->{$_}} ) " \n" ;
Growing the bars up is a little more tricky. I tried a couple of things for the battery life chart, and finally realized that you sort of had to fill in from the top. First you treat the top row as special, and you fill in every row with the inverse of the height of the bar you want (with a special case for bars that go all the way to the top). So if your graph has 10 steps, you go across the top row filling in blank bars of height 10-f(x) for each spot (and filling in solid bars for those places where f(x) = 10). Then after that you just step each row filling in just the bars that are that high.my $ticks= " ". join('', map { " \n" } ( 3, 1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 1, 3, 1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 1, ) ). " " ;
So if for instance, my data points were: 6, 8, 2, 3, 1, 0, 3
My first row would have six blank bars of height, 4, 2, 8, 9, 10, 7; then the next row (row 9 counting down from the top) would have nothing in it, the next row (row 8) would have one bar of height 8, next row would be empty, next row (row 6) would have one, and on and on:
And once again, I found the solution to implement this was rather simple:
## first row passSigh. Now that I can see what I'm doing, I see I have a lot to do. Better get to it.$txt= " ## fill in pass" ; foreach (@$data) { $txt .= ($_ >= $steps) ? " \n" ;" : " " ; } $txt .= " foreach my $level (reverse 1..($steps-1)) { $c= $cols->[$level ] || $fg ; $txt .= " ". join('', map { " \n" ; }" } grep { $_ == $level } @$data ). "
Feb '04
Oops I dropped by satellite.
New Jets create excitement in the air.
The audience is not listening.
Mar '04
Neat chemicals you don't want to mess with.
The Lack of Practise Effect
Apr '04
Scramjets take to the air
Doing dangerous things in the fire.
The Real Way to get a job
May '04
Checking out cool tools (with the kids)
A master geek (Ink Tank flashback)
How to play with your kids