Fancy graphing with PHP and CSS

Sometimes I just can't control my 'Not-Invented-Here' syndrome. Vertical bar graphs, unlike their easy-sleezy cousins (horizontal bar graphs) are hard to create. They require a bit of CSS trickery and some relaxing of the "no style within my body tags, thank you" mentality. Thus, they are a fun challenge for someone who is obsessed with markup. If you combine them with a database full of information, it only gets better.

Vertical CSS Graphs

I can't count the number of times that I've implemented something similar to this at work. Feeling more than a bit sorry for people whos' job it is to create stuff like this in Excel on a weekly basis, I wrote a tutorial about making them for yourself. Hopefully someone finds it useful. Its also an excuse for me to show off a few of the styles that I came up with.

If you write any styles to go with this, I'd love to see them. I may even start a little gallery of graphing styles, so yeah... contribute! Oh, and I'm listening so if you have some feedback, let me know.

4 Comments