I want to automatically generate an HTML table from some user data. One of the columns in my data is a number in the range 0-100, and I would like to show it more graphically, most preferably with a colored horizontal bar. The length of the bar will represent the value, and the color will also change (i.e. below 20 reds, etc.)
Something like this (created with paint.net):
alt text http://eli.thegreenplace.net/files/temp/df.png
One way to achieve this is to create an appropriate PNG and place it there as an image. But I think this is possible, possibly with some HTML / CSS / Javascript in automatic mode (i.e. the values ββentered in the table are numeric, and JS converts them to columns before showing).
Perhaps someone has already done something similar and can share it?
Thank you in advance
PS: If it can work in IE6, that would be better (don't ask ...)
PPS: it should work offline, so existing web services (like google charts) won't help
source share