0
我一直在试图用flot做一个图表,并且遇到了问题。我使用开发人员工具查看错误的位置,以及JSlint检查我的JavaScript,但都表示没有“错误”。除了图表没有显示,所以我一定做错了什么。以下是图表代码:Flot图不显示。没有错误代码
$(document).ready(function(){
var graphdata = {"label":"MMR Over time","data":{"Rubick":6524,"Lion":6550,"Magnus":6565,"Keeper of the Light":6566}};
var options = {
series: {
lines: { show: true },
points: {
radius: 3,
show: true
}
}
};
$.plot($(".graph_holder"),
graphdata,
options);
});
您如何看待图形的外观?如果你想要一个线形图,那么数据应该是数组格式,x值是数字,而不是一个字符串。 IIRC。 – Sergio