Eric Ilavia
Eric Ilavia

Reputation: 91

jquery jqplot charts

I am trying jquery jqplot charts,

here is my code for the same,

<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>

it gives javascript error that object cannot support this property or method, can anyone please guide me on this, anybody's help will be highly appreciated,

Thanks in Advance

Upvotes: 0

Views: 2318

Answers (3)

PriorityMark
PriorityMark

Reputation: 3247

You need to include files in order of dependency. Jqplot depends on jQuery, so jQuery should be listed first, and only include one instance of each. You are including multiples of just about every file there.

You may want to learn the basics of JavaScript before you try to used advanced plugins.

Upvotes: 0

Mehdi Maujood
Mehdi Maujood

Reputation: 400

You'll have to remove line number 10 from that code.

You've included the jquery.min.js file after including jqplot on line 10. jquery.min.js recreates the jQuery object (removing the jqplot function) and needs to be removed.

Upvotes: 1

Related Questions