You should have viewed and looked at the code at Lecture - JQuery - Creating a Simple Calculator
Topics covered:
Using the HighCharts plotting library - http://www.highcharts.com/
Creating a calculator that will plot the results of your calculation
Using jFiddle and jQuery
http://online1.daytonastate.edu/player2.php?id=b31df16a88ce00fed951f24b46e08649
The full charting library is at http://www.highcharts.com/
The code is available at http://jsfiddle.net/reaglin/auw79/
You may want to review the jquery documentation at http://jquery.com/