Tuesday, February 5th, 2008

Canvas Pie Chart from datatable

Category: Canvas, Unobtrusive JS

I love it when a plan comes together (removes cigar): After I played with Google charts and porting the idea of generating charts from accessible table data over to YUI charts Stoyan Stevanof had to use the same idea to generate his own, home-made Canvas-driven charts:

Example chart generated from a data table using canvas

His solution shows in a few lines not only how to get the data from a table, but also how to do a pie chart in canvas.

Posted by Chris Heilmann at 1:24 pm

3.5 rating from 29 votes


Comments feed TrackBack URI

Fu*k IE. Really. This lil code block is beautiful and works in Opera, FF, and Safari. To get it to work in IE, you’ll have to double the amount of code.

Comment by emehrkay — February 5, 2008

I’ve wrapped up a rough JQuery plugin around this, in case someone is interested: http://blogs.atalayasec.org/dev/?p=9

Comment by drvillo — February 7, 2008

Leave a comment

You must be logged in to post a comment.