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]-->
<script language="javascript" type="text/javascript" src="https://bitbucket.org/cleonello/jqplot/raw/b5a7796a9ebf/src/plugins/jqplot.canvasTextRenderer.js"></script>
<div id="chart1" style="margin-top:20px; margin-left:20px; width:600px; height:300px;"></div>
JavaScript
$(document).ready(function() {
$.jqplot.postDrawHooks.push(function() {
var swatches = $('table.jqplot-table-legend tr td.jqplot-table-legend-swatch');
var labels = $('table.jqplot-table-legend tr td.jqplot-table-legend-label');
var kk=5
$(swatches).hide();
$(labels).hide();
$(swatches[0]).show();
$(labels[0]).show();
$(swatches[kk]).show();
$(labels[kk]).show();
});
$.jqplot.config.enablePlugins = true;
s1 = [[10.0, 11.0, 11.0, 12.0, 12.0, 14.0], [10.0, 11.0, 12.0, 12.0, 12.0, 12.0], [10.0, 13.0, 14.0, 15.0, 15.0, 16.0], [10.0, 10.0, 11.0, 11.0, 11.0, 12.0], [10.0, 10.0, 11.0, 12.0, 12.0, 12.0]];
s2 = [10.0, 10.4, 10.816, 11.248640000000002, 11.698585600000003, 12.166529024000004];
s1.push(s2);
$.jqplot('chart1', s1, {
seriesDefaults: {
showMarker: false,
pointLabels: {
show: false
},
},
series:[
{label:'Process A', color: 'red'}, {label:'Process A', color: 'red'}, {label:'Process A', color: 'red'}, {label:'Process A', color: 'red'}, {label:'Process A', color: 'red'}, {label:'Process B',color:'blue'}
],
legend: {
show: true,
location: 'nw',
placement: 'inside',
fontSize: '11px'
}
})
})