我正在试用 jqPlot,但我不知道如何设置不同系列的名称。
目前,我的代码如下所示:
$(document).ready(function () {
$.jqplot('chartdiv', [
[[201201, 10], [201202, 20], [201203, 30], [201204, 60], [201205, 40]],
[[201201, 5], [201202, 10], [201203, 7], [201204, 8], [201205, 11]]
], {
axes: {
xaxis: {
label: "Year/month",
pad: 0
},
yaxis: {
label: "Amount (Kr)"
}
},
legend: {
show: true
}
});
});
它呈现图表,但系列被命名为系列 1 和系列 2。有什么方法可以控制系列的命名吗?
最佳答案
要为系列命名,您必须设置“系列”下的“标签”。 Please see here for documentation.
关于javascript - jqPlot和命名系列,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/10895957/