uncaught exception: No plot target specified
I got this error while working with JQPlot Jquery API.
This is due to specifying wrong ID
ID needs to specified as follows.
Also the following Javascript API files need to be included.
JavaScript Code:
Basic API JS Library File
Library File For Donut Chart
I got this error while working with JQPlot Jquery API.
This is due to specifying wrong ID
ID needs to specified as follows.
<div id="testid" > </div>
Also the following Javascript API files need to be included.
JavaScript Code:
function drawgraph( data1,data2){JQuery Library File
var usedp=Math.ceil( data1/data2*100 );
var freep=Math.ceil( 100-usedp );
//alert( usedp );
//alert( freep );
var data = [
['Free %', freep],['Used %', usedp] ];
var plot1 = jQuery.jqplot ('testid', [data],
{
seriesDefaults: {
// Make this a pie chart.
renderer: jQuery.jqplot.PieRenderer,
rendererOptions: {
// Put data labels on the pie slices.
// By default, labels show the percentage of the slice.
showDataLabels: true
}
},
legend: { show:true, location: 'e' }
}
);
}
<script type="text/javascript" language="javascript" src="lib/jquery-1.8.2.js"></script>
Basic API JS Library File
<script type="text/javascript" language="javascript" src="js/jquery.jqplot.min.js"></script>
Library File For Donut Chart
<script type="text/javascript" language="javascript" src="js/jqplot.donutRenderer.min.js"></script>Library File For Pie Chart
<script type="text/javascript" language="javascript" src="js/jqplot.pieRenderer.min.js"></script>
Excellent tips. Really useful stuff .Never had an idea about this, will look for more of such informative posts from your side... Good job...Keep it up
ReplyDeletephp development Melbourne