Dynamic Javascript Chart Plotting With PlotKit

PlotKit is a slick javascript library that allows you to easily generate line, bar, and pie charts with a few lines of javascript code. It supports rendering to both Canvas and SVG, so you can use it to add charting to your application and still be able to support a fair amount of browsers.
I'm glossing over some of the more advanced features, but check out how easy it is to generate a simple graph:
var data = [[0,0], [1,2], [2,3], [3, 7], [4, 8], [5, 6]];
var plotter = EasyPlot("line", {}, $("example"), [data]);
That will plot the values from the "data" array and display it in a div with the ID "example". Cool, no?
Charting from javascript is interesting, because it allows you to link in to data APIs that are provided by other services. There's a link below to a tool that will pull in data from a published Google Spreadsheet and generate the necessary javascript to display widget graphs on another site. It reminds me of how you can pull Excel graphs into a Word document, except javascript is the new, better OLE. With output tools like PlotKit, online services like Google Spreadsheets, and open data APIs in between, there are just so many possibilities now for creating information that can be shared in a variety of formats.
Posted by Jason Striegel |
Apr 18, 2007 08:18 PM
Ajax |
Permalink
| Comments (2)
Recent Entries
- Minty soldering jig
- Selecting row number in MySQL
- iPhone 3G software unlock
- Python on Android
- Controlling Sony camcorders with the Arduino
- Gradient text effect in CSS
- Retro gaming emulators that include (legal) ROMs?
- Das DereLicht - ham radio transmitter from a CFL bulb
- Using Google App Engine as a personal CDN
- Route-me - Open Source mapping library for iPhone
Comments
Newest comments listed first.
| Posted by: thematrix on August 7, 2007 at 9:28 AM |
it is not working in internet explorer, any ideas to make it work?
| Posted by: BillyG_n_SC on August 10, 2007 at 1:04 PM |
I got it working at http://www.billy-girlardo.com/Maps/Greenville_SC/Crime/TotalCrimeSceneCalls.html in IE6 with this as the very first line (before the DOCTYPE):
?xml version="1.0" encoding="UTF-8"?
I don't have it working in IE7 yet though, but neither does the demo from the site itself, so it's gonna take some conditional statements prolly.
Bloggers
Welcome to the Hacks Blog!
Categories
- Ajax
- Amazon
- Android
- AppleTV
- arduino
- Astronomy
- Baseball
- BlackBerry
- Blogging
- Body
- Cars
- Cryptography
- Data
- Design
- Education
- Electronics
- Energy
- Events
- Excel
- Excerpts
- Firefox
- Flash
- Flickr
- Flying Things
- Food
- Gaming
- Gmail
- Google Earth
- Google Maps
- Government
- Greasemonkey
- Hacks Series
- Hackszine Podcast
- Halo
- Hardware
- Home
- Home Theater
- iPhone
- iPod
- IRC
- iTunes
- Java
- Kindle
- Knoppix
- Language
- LEGO
- Life
- Lifehacker
- Linux
- Linux Desktop
- Linux Multimedia
- Linux Server
- Mac
- Mapping
- Math
- Microsoft Office
- Mind
- Mind Performance
- Mobile Phones
- Music
- MySpace
- MySQL
- NetFlix
- Network Security
- olpc
- Online Investing
- OpenOffice
- Outdoor
- Parenting
- PCs
- PDAs
- Perl
- Philosophy
- Photography
- PHP
- Pleo
- Podcast
- Podcasting
- Productivity
- PSP
- Retro Computing
- Retro Gaming
- Science
- Screencasts
- Security
- Shopping
- Skype
- Smart Home
- Software Engineering
- Sports
- SQL
- Statistics
- Survival
- TiVo
- Transportation
- Travel
- Ubuntu
- User Interface
- Video
- Virtualization
- Visual Studio
- VoIP
- Web
- Web Site Measurement
- Windows
- Windows Server
- Wireless
- Word
- World
- Xbox
- Yahoo!
- YouTube
Archives
- January 2009
- December 2008
- November 2008
- October 2008
- September 2008
- August 2008
- July 2008
- June 2008
- May 2008
- April 2008
- March 2008
- February 2008
- January 2008
- December 2007
- November 2007
- October 2007
- September 2007
- August 2007
- July 2007
- June 2007
- May 2007
- April 2007
- March 2007
- February 2007
- January 2007
- December 2006
- November 2006
- October 2006
- September 2006
Recent Posts
- Minty soldering jig
- Selecting row number in MySQL
- iPhone 3G software unlock
- Python on Android
- Controlling Sony camcorders with the Arduino
- Gradient text effect in CSS
- Retro gaming emulators that include (legal) ROMs?
- Das DereLicht - ham radio transmitter from a CFL bulb
- Using Google App Engine as a personal CDN
- Route-me - Open Source mapping library for iPhone
www.flickr.com
|






Leave a comment