I need to get numerical data for displaying in a chart on a web page, and I found that JQPlot looks like one of the simplest jQuery libraries for this, as well as for free use. However, despite all my attempts to look at examples and tutorials on their web page, I simply cannot get any diagram to display on the page. Here is my code for the base diagram only:
<html> <head> <title>Testing plots functions</title> <script type="text/javascript" src="jquery-1.7.2.js"></script> <script type="text/javascript" src="JQPlot/plugins/jqplot.canvasTextRenderer.min.js"></script> <script type="text/javascript" src="JQPlot/plugins/jqplot.canvasAxisLabelRenderer.min.js"></script> <script type="text/javascript"> $(document).ready(function(){ var plot1 = $.jqplot ('chart1', [[3,7,9,1,4,6,8,2,5]]); }); </script> </head> <body> Here is the start of the page...<br> <div id="chart1"></div> </body> </html>
Most of this code is taken directly from their examples web page (http://www.jqplot.com/tests/line-charts.php), so I donβt know why nothing happens on this page.
source share