我正在尝试绘制 24 小时内的值。我正在jqplot 网站上的这个例子中工作。我看不出我做错了什么。
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.8.3/jquery.min.js"></script>
<script type="text/javascript" src="javascript/jqplot/jquery.jqplot.js"></script>
<link rel="stylesheet" href="javascript/jqplot/jquery.jqplot.css" type="text/css" />
<script type="text/javascript" src="javascript/jqplot/plugins/jqplot.dateAxisRenderer.min.js"></script>
<div id="chart1"></div>
<script type="text/javascript">
$(document).ready(function(){
var line2=[['2008-06-30 8:00AM',4], ['2008-06-30 9:00AM',6.5], ['2008-06-30 10:00AM',5.7], ['2008-06-30 11:00AM',9], ['2008-06-30 12:00PM',8.2]];
var plot2 = $.jqplot('chart1', [line2], {
title:'Customized Date Axis',
gridPadding:{right:35},
axes:{
xaxis:{
renderer:$.jqplot.DateAxisRenderer,
tickOptions:{formatString:'%r'}
}
},
series:[{lineWidth:4, markerOptions:{style:'square'}}]
});
});
</script>