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>
<div id="chart1" style="margin-top:20px; margin-left:20px; width:600px; height:300px;"></div>
JavaScript
$.jqplot.config.enablePlugins = true;
var chartData = [[1, .92], [2,.93], [3, .98],[4,.95]];
function PlotChart(chartData) {
var plot2 = $.jqplot('chart1', [chartData], {
title: '',
seriesDefaults: {
renderer: $.jqplot.CanvasAxisLabelRenderer,
rendererOptions: {
smooth: true
},
pointLabels: {
show: true
}
},
axes: {
xaxis: {
label: 'date',
ticks : [ '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', '10','11', '12', '13', '14'],
renderer: $.jqplot.CategoryAxisRenderer,
// renderer to use to draw the axis,
tickOptions: {
formatString: '%d'
}
},
yaxis: {
ticks:[ '0', '.5','.9', '1' ],
label: 'PF',
tickOptions: {
formatString: '%.2f'
}
}
},
highlighter: {
sizeAdjust: 7.5
},
cursor: {
show: true
}
});
}
PlotChart(chartData);