Some web projects require data to be expressed as a visual graph. While there are libraries that can do this, it's not a bad idea to understand how it can be done using the facilities available to HTML5.
The CANVAS tag which is a part of the HTML5 lexicon provides the means to draw some pretty complex things using vectors. Vectors are points along a line, and lines are what we'll use to draw our graphs. Now we need some data to graph.
Clicking the button will call the plotGraph function (shown in the code sample below) passing the id of the CANVAS tag and a data structure containing our graphing plots.
Thanks for your time, and as always, feedback is appreciated. (You can contact me via the "contact the author" link.) Be sure to check out some of my other examples and give our sponsors consideration--their support helps us keep this site running. Best wishes!