如何删除这个空白区域,如下面的屏幕截图(绿线)所示?
js代码如下:
$(function() {
var d = [];
var t = 1377655220 * 1000;
for (var i=0;i<6;i++) {
d.push([t+(i*60*1000), i*2]);
}
var data = [{
label: "Packets",
data: d
}];
var options = {
colors: ['#F7A500'],
legend: {
labelBoxBorderColor: '#fff',
backgroundOpacity:0
},
series: {
lines: {
show:true,
lineWidth:3,
fill:true
},
points: {
show:true,
fill: true,
fillColor: '#F7A500'
}
},
xaxis: {
mode: 'time',
tickSize: [1,'minute'],
timeformat: "%m/%d <br> %H:%M"
},
yaxis: {
tickSize: 2
},
grid: {
borderWidth: 1,
color: '#aaa',
autoHighlight: true,
mouseActiveRadius: 3,
labelMargin: 15
}
};
var plot = $('#placeholder').plot(data, options);
});
HTML:
<div id="placeholder" style="width:800px;height:300px;border:1px solid red;"></div>
jsfiddle:http: //jsfiddle.net/resting/hx6UJ/3/