我使用https://github.com/flot/flot
我制作图表:
$.plot("#chart", [data.points], {
series: {
label: data.title,
lines: {
show: true,
},
points: {
show: true
},
},
yaxis: {
tickDecimals: 0,
alignTicksWithAxis: 1
},
xaxis: {
mode: "time",
timeformat: "%d/%m/%Y",
show: true,
minTickSize: [1, "day"],
min: (new Date(2016, 5, 21)).getTime(),
max: (new Date(2016, 5, 28)).getTime(),
alignTicksWithAxis: 1
},
grid: {
borderWidth: 1,
labelMargin:10,
hoverable: true,
clickable: true,
mouseActiveRadius:15
},
legend:{
container: '.flc-legend',
backgroundOpacity: 0.5,
noColumns: 0,
lineWidth: 0
}
});
但网格转移了。如何解决?
我将截图附加到问题:
数据: [[1466974800000,10],[1466888400000,10],[1466802000000,10] ...]