jqPlot Examples Baseline
This particular fiddle is setup so that basic jqPlot examples can be created. It's, at this point, a generic template setup in a state that will allow a simple fork to get you up and running faster.
HTML
<link rel="stylesheet" href="http://www.prioritymarketers.com/jqplot/src/jquery.jqplot.css">
<script src="http://www.prioritymarketers.com/jqplot/src/jquery.jqplot.js"></script>
<script src=" http://www.prioritymarketers.com/jqplot/src/plugins/jqplot.barRenderer.js"></script>
<script src=" http://www.prioritymarketers.com/jqplot/src/plugins/jqplot.categoryAxisRenderer.js"></script>
<script src=" http://www.prioritymarketers.com/jqplot/src/plugins/jqplot.pointLabels.js"></script>
<script src=" http://www.prioritymarketers.com/jqplot/src/plugins/jqplot.cursor.js"></script>
<!--[if lt IE 9]>
<script src="http://www.prioritymarketers.com/jqplot/src/excanvas.min.js"></script>
<![endif]-->
<input type="button" id="button1" value="Replot"/>
<div id="chart1" style="margin-top:20px; margin-left:20px; width:600px; height:300px;"></div>
JavaScript
function myReplot() {
var newdata = [[1,3],[2,6],[3,8],[4,11]];
plot1.series[1].data = newdata;
plot1.replot(false);
}
$(document).ready(function(){
$.jqplot.config.enablePlugins = true;
$("#button1").on("click",function(){
myReplot();
});
var data = [[2, 6, 7, 10],[0,0,0,0]];
var ticks = ['a', 'b', 'c', 'd'];
plot1 = $.jqplot('chart1', data, {
// Only animate if we're not using excanvas (not in IE 7 or IE 8)..
stackSeries : true,
animate: !$.jqplot.use_excanvas,
//animateReplot: !$.jqplot.use_excanvas,
seriesDefaults:{
renderer:$.jqplot.BarRenderer,
pointLabels: { show: true,
stackedValue: true},
color: "orange"
},
axes: {
xaxis: {
renderer: $.jqplot.CategoryAxisRenderer,
ticks: ticks
},
yaxis:{
min:0,
max:50
}
},
highlighter: { show: false }
});
});