Dojo’s crazy chart drawing
When you want to draw a graph on a webpage, the tried and true approach is to use some imaging package on the server to generate an image, and include that in the webpage.
That can put a bit of a load on the server, and the images generated are static; they can’t change unless an entirely new image is pulled from the server.
Some services, like Google Analytics, use Flash to generate graphs; that’s good because the graphs can be dynamic if the data or the page changes, and the rendering is done all on the client. But Flash has its own problems.
Now, apparently, with the Dojo Javascript toolkit, you can generate crazy beautiful charts without Flash, and update them in real time. The flaw? Safari doesn’t support this (but it will, only in future versions) nor does IE 5.5. Still, this is clearly the future.
Why do I mention it? Because it’s cool, but also because a new product I’m working on with Mike Quinn (to be released Real Soon Now) uses purely CSS (and Javascript, if you want to update the graphs in real time) to generate line graphs and pie charts. It’s not as powerful as Dojo’s functionality, but it does work on all browsers right now, today. I think we’re the first one’s to do pure CSS pie charts and line graphs (I’ve seen CSS bar graphs before). We’ll be releasing an article soon which chronicles the development adventure, along with details on how the CSS graphing is done.
For what it is worth, javascript line and pie charts that use CSS to draw the chart client side have been done :
http://www.lutanho.net/diagram
Said by KS February 1, 2007 at about 6:50 pm