【发布时间】:2012-07-24 08:23:24
【问题描述】:
我需要获取数值数据以在网页上显示为图表,我发现 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>
大部分代码直接取自他们的示例网页(http://www.jqplot.com/tests/line-charts.php),所以我不知道为什么页面上什么都没有发生。
【问题讨论】:
标签: javascript jquery html rendering jqplot