我想在我的图表的最后几个刻度上设置选择,但是我无法执行该操作,我尝试了一个名为setSelection
的函数失败,在这里或示例中找到了很少的其他方法,但我只能'让它开始工作。
这是我的flot配置。
{
series: {
lines: { show: true },
shadowSize: 0
},
crosshair: { mode: "x" },
points: { show: true },
xaxis: {
//zoomRange: [0, 0],
mode: "time",
tickLength: 5,
panRange: [null, null]
},
selection: { mode: "x" },
grid: {
hoverable: true,
clickable: false,
markings: weekendAreas
},
yaxis: {
//zoomRange: [0, 0],
//panRange: [36, 39.5]
panRange: false
},
zoom: {
// 'amount': 2,
// 'center': { left: 400, top: 0 }
//interactive: true
},
pan: { interactive: true }
});
//setSelection({ xaxis: { from: 0, to: 10 }, yaxis: { from: 10, to: 20 } });
plot.setSelection({ xaxis: { from: 5, to: 8 }});