Flot 时间序列不画线

Flot time series not drawing line

我正在尝试使用过去 24 小时的时间戳(每 1 小时间隔绘制一次数据)绘制折线图,​​以显示 flot 中的递减值和递增值。当我设置我的 minTickSize、最小值和最大值时,该线不再绘制。

完整代码(也在此fiddle):

$(function () {

    var d = [
        [1443903422000, 4994],
        [1443903429000, 4993],
        [1443910918000, 4999]
    ];
    var epochT = (new Date).getTime(); // time right now in js epoch

    $.plot("#placeholder", [d], {
        xaxis: {
            mode: "time",
            timeformat: "%I:%M",
            minTickSize: [1, "hour"],
            min: epochT - 2 * 86400000,
            max: epochT,
            timezone: "browser",
        },
        series: {
            lines: {
                show: true
            },
            points: {
                show: true
            },
        },
        grid: {
            hoverable: true,
            clickable: true,
        },
    });
});

任何人都可以指出正确的方向来解决这个问题吗?

Yout 时间戳以秒为单位,而不是像 JavaScript 需要的微秒(参见 here in the documentation). Multiplying by thousand (and shifting the min value because it already cuts off the chart) leads to this updated fiddle version

代码更改:

var d = [[1443903422000,4994], [1443903429000,4993], [1443910918000,4999]];

min: epochT - 2*86400000,