如果我们有这样的代码
yAxis : {
title : {
text : 'Exchange rate'
},
plotLines : [{
value : 0.6738,
color : 'green',
dashStyle : 'shortdash',
width : 2,
label : {
text : 'Last quarter minimum'
}
}, {
value : 0.7419,
color : 'red',
dashStyle : 'shortdash',
width : 2,
label : {
text : 'Last quarter maximum'
}
}]
},
我如何获取 plotlines json 字符串并将其分配给一个变量并将此变量传递给 plotline 对象?我试过这样的东西
var jsonObj = [];
jsonObj.push({ "value": 1256211571000, "color": '#D2691E', "width": 1, "label": { "text": 'rinse'} });
var myLines = JSON.stringify(jsonObj);
然后将 mylines 传递给 plotlines 但它并没有真正起作用