2012-01-27 47 views
0

我試圖jQuery的jqplot圖表,jQuery的jqplot圖表

這裏是我相同的代碼,

<html> 
<head> 
<script type="text/javascript" src="excanvas.js"></script> 
<script type="text/javascript" src="jquery.js"></script> 
<script type="text/javascript" src="jquery.jqplot.js"></script> 
<script type="text/javascript" src="jquery.jqplot.min.js"></script> 
<script type="text/javascript" src="jqplot.categoryAxisRenderer.min.js"></script> 
<script type="text/javascript" src="jqplot.barRenderer.js"></script> 
<script type="text/javascript" src="jqplot.barRenderer.min.js"></script> 
<script type="text/javascript" src="jqplot.categoryAxisRenderer.min.js"></script> 
<script type="text/javascript" src="jquery.min.js"></script> 
<script type="text/javascript" src="jqplot.canvasTextRenderer.min.js"></script> 
<script type="text/javascript" src="jqplot.canvasAxisLabelRenderer.min.js"></script> 
<link rel="stylesheet" type="text/css" href="jquery.jqplot.css" /> 
<link rel="stylesheet" type="text/css" href="jquery.jqplot.min.css" /> 
<script type="text/javascript"> 
$(document).ready(function(){ var plot1 = $.jqplot ('chart3', [[3,7,9,1,4,6,8,2,5]]);}); 
</script> 
</head> 
<body> 
<div id="chart3" name="chart3" style="width:400px; height:300px;"></div> 
</body> 
</html> 

它給該對象不支持此屬性或方法的JavaScript錯誤,任何人都可以請引導我這一點,任何人 的幫助將不勝感激,提前

感謝

+0

不相關的問題,但你應該使用縮小的Java腳本文件或非縮小的JS文件。不要同時使用兩者。 – Gaurav 2012-01-27 13:04:05

回答

1

你必須從刪除C行數10頌。

您在第10行包含jqplot後包含了jquery.min.js文件。jquery.min.js重新創建jQuery對象(刪除jqplot函數)並需要刪除。

+0

好的,謝謝你的幫助,這已經完成 – 2012-02-06 06:13:54

0

您需要按照依賴性順序包含文件。 Jqplot依賴於jQuery,因此應該首先列出jQuery,並且只包含每個jQuery的一個實例。您包含幾乎每個文件的倍數。

在嘗試使用高級插件之前,您可能想了解JavaScript的基本知識。

+0

感謝您的幫助,是的,我正在通過基礎知識,你能推薦一個好的來源? – 2012-02-06 06:15:02