sup*_*999 6 html javascript jquery rendering jqplot
我需要将数值数据显示为网页上的图表,并且我发现JQPlot看起来是最简单的JQuery库之一,也是免费的.然而,尽管我努力在他们的网页上查看示例和教程,但我根本无法在页面上显示任何类型的图表.这是我的代码,仅用于开始的基本图表:
<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>
Run Code Online (Sandbox Code Playgroud)
大部分代码都直接来自他们的示例网页(http://www.jqplot.com/tests/line-charts.php),所以我不知道为什么页面上没有发生任何事情.
这些文件是否存在于您的计算机上以及此文件夹结构中?
编辑:
确保您也包含基本文件(jquery.jqplot.min.js)(在这些页面上很容易错过)
http://www.jqplot.com/src/jquery.jqplot.min.js
| 归档时间: |
|
| 查看次数: |
8037 次 |
| 最近记录: |