我们在jquery中获得以下数组。
var grdXTcks = ["08/26", "09/09", "09/23", "09/26", "10/07", "10/10", "10/22", "11/05", "11/07"];
但是我需要将数组发送到jqplot:
var grdXTcks = ['08/26', '09/09', '09/23', '09/26', '10/07', '10/10', '10/22', '11/05', '11/07'];
有人可以建议有一个快速的方法吗?
下面是我发送给jqplot的数据:
var grdYTcks =[20, 30, 40, 50, 60, 0, 70, 80, 90];
var grdXTcks = ['08/26', '09/09', '09/23', '09/26', '10/07', '10/10', '10/22', '11/05', '11/07'];
plot1 = $.jqplot(grphOneID, [grdYTcks, grdXTcks], {
title: 'Highlighting, Dragging, Cursor and fsdfdsTrend Line',
axes: {
xaxis: {
renderer: $.jqplot.CategoryAxisRenderer,
ticks: grdXTcks,
tickOptions: {
formatString: '%#m/%#d'
},
pad: 0
},
yaxis: {
min: -10,
max: 110,
tickInterval: 10,
tickOptions: {
formatString: '%d'
}
}
},
highlighter: {
sizeAdjust: 10,
tooltipLocation: 'n',
tooltipAxes: 'y',
tooltipFormatString: '<b><i><span style="color:red;">hello</span></i></b> %.2f',
useAxesFormatters: false
},
cursor: {
show: true
}
});
由于
答案 0 :(得分:0)
两者都相同,"
和'
都用于包含字符串文字。