0

浮动图未正确显示日期/小时。在 x 轴上有 unix 时间戳的值。

数据:

 [[1365712202000,61.39],[1365712510000,60.89],[1365712817000,0]]

浮动配置:

    $.plot(plotarea , [
        {
            label: "Value",
            data: dataLine,
            color: "#FF8848",
            lines: { show: true, steps: false },
            points: { show: true },
            grid: { hoverable: true, clickable: true },
            xaxis: { mode: "time", timeformat: "%d/%H/%M" }
        }
    ]

在此处输入图像描述

4

1 回答 1

2

你的配置是错误的。 xaxis并且grid不是系列选项,而是情节选项。尝试:

$.plot($('#placeholder') ,[{
        label: "Value",
        data: dataLine,
        color: "#FF8848",
        lines: { show: true, steps: false },
        points: { show: true }            
    }],
    {
       grid: { hoverable: true, clickable: true },
       xaxis: { mode: "time", timeformat: "%d/%H/%M" }
    }
);

在这里拉小提琴。

于 2013-04-12T23:51:14.890 回答