Just found this superb jQuery plugin - Flot allows you to quickly create graphs and other plots, complete with interactivity.
Source code on GoogleSource