有谁知道如何以逆时间顺序使用 Flot 时间序列,首先显示最新日期?我一直想搜索一个选项,但在 API 中找不到。这是我的代码
var plot = $.plot("#placeholder1", [data], {
series: {
lines: {
show: true,
fill: 0.1
},
points: { show: true,
fill: 0.05 }
},
xaxis:
{
mode: "time",
minTickSize: [1, "day"],
ticks:7
},
grid: {
backgroundColor: { colors: [ "#fff", "#fff" ] },
borderColor: "#ccc",
borderWidth: {
top: 1,
right: 1,
bottom: 1,
left: 1
},
hoverable: true,
clickable: true,
markings: weekendAreas
},
legend: {
labelBoxBorderColor: "#fff",
position: "ne",
margin: [0, 0]
}
});
Run Code Online (Sandbox Code Playgroud)