我试图用 Flot 在一张图表上显示本月(图表 1)和上个月(图表 2)的访问者数量。我目前正在使用图表 1,但由于 x 轴(日期),我不确定如何与图表 2 重叠。
当前工作代码:
$.getJSON('jsondata.txt',function(json){
var visits = [json.visits];
var options = {
xaxis: {
mode: "time",
},
grid: { hoverable: true, clickable: true },
lines: { show: true },
points: { show: true }
}
var plot = $.plot($('.chart'),visits,options);
});