【发布时间】:2014-01-10 09:41:08
【问题描述】:
没有绘制 JSON 数据?
Javascript:
var datasets = JSON.parse(xmlhttp.responseText);
alert(JSON.stringify(datasets[0]));
var plotarea = $("#placeholder");
$.plot(plotarea, [[datasets[0].points]], {
xaxis: {
mode: "time",
min: (new Date(2013, 11, 1)).getTime(),
max: (new Date()).getTime()
}
});
输出:
{"name":"Test.txt","points":[[1389313796000,2],[1389314796000,4]]}
渲染图:
【问题讨论】:
标签: javascript json flot