我正在尝试将图表底部的日期旋转为垂直与水平.我正在使用flot-tickrotor,但它似乎无法正常工作.
xaxis: {
rotateTicks: 110,
mode: "time",
timeformat: "%m/%d",
minTickSize: [7, "day"],
ticks: cpudatearray
}
Run Code Online (Sandbox Code Playgroud)
最终结果不正确,一切都显得混乱.

我有下面的图表,我想在图例项之间添加空格.我尝试将空格附加到传递给标签的字符串,但没有成功.有任何想法吗?TIA
code
$(document).ready(function() {
$.plot($("#NR"), NRLine, {
grid: {
backgroundColor: "#E5E5E5",
hoverable: true
},
xaxis: {
mode: "time",
timeformat: "%m/%d",
minTickSize: [7, "day"],
ticks: datearray
},
legend: {
noColumns: 4,
container: $("#chartLegend")}
}
);
});
Run Code Online (Sandbox Code Playgroud)
code
我知道有几个关于此的帖子,但我想我错过了一些东西.我在ajax调用中返回下面的数据,但它似乎不是FLOT的正确格式.是否有更好的格式来返回数据或应该更改FLOT以识别它?TIA
<script type="text/javascript">
$(document).ready(function() {
// Add the page method call as an onclick handler for the div.
$("#Result").click(function() {
$.ajax({
type: "POST",
url: "WebTest.aspx/GetData",
data: "{}",
contentType: "application/json; charset=utf-8",
dataType: "json",
success: function(msg) {
// Replace the div's content with the page method's return.
var jsObj = []
jsObj.push($.parseJSON(msg.d));
$.plot($("#Result"), jsObj, {
grid: {
backgroundColor: "#E5E5E5",
mouseActiveRadius: 20
}
}
);
}
});
});
});
</script>
[WebMethod]
public static string GetData()
{
DataLines dataLine1 = new DataLines();
DataLines dataLine2 …Run Code Online (Sandbox Code Playgroud)