我想将 qm.negativesData 字符串添加到下面的 qm.data 中。但我得到一个语法错误。谁能帮我解决这个问题?
qm.data = [{
"xScale":"ordinal",
"comp":[],
"main":[{qm.negativesData},{qm.positivesData}],
"type":"line-dotted",
"yScale":"linear"}];
qm.negativesData 和 qm.positivesData 包含一个字符串,其中包含用于构建我的图表的数据。
/// 更新
例如 qm.negativesData 的输出是:
"{"className":".main.l1","data":[{"x":"2013-10-16","y":"3283581"},{"x":"2013-10-17","y":"1512116"},{"x":"2013-10-18","y":"3967"},{"x":"2013-10-19","y":"1094"},{"x":"2013-10-20","y":"853"},{"x":"2013-10-21","y":"1205"},{"x":"2013-10-22","y":"2618700"},{"x":"2013-10-23","y":"3928291"},{"x":"2013-10-24","y":"3670318"},{"x":"2013-10-25","y":"3347369"},{"x":"2013-10-26","y":"2525573"},{"x":"2013-10-27","y":"3224612"},{"x":"2013-10-28","y":"3992964"},{"x":"2013-10-29","y":"3949904"},{"x":"2013-10-30","y":"3568618"},{"x":"2013-10-31","y":"3104696"},{"x":"2013-11-01","y":"3246932"},{"x":"2013-11-02","y":"2817758"},{"x":"2013-11-03","y":"3198856"},{"x":"2013-11-04","y":"3952957"},{"x":"2013-11-05","y":"3934173"},{"x":"2013-11-06","y":"3878718"},{"x":"2013-11-07","y":"3642822"},{"x":"2013-11-08","y":"3388646"},{"x":"2013-11-09","y":"318335"}]}"
我认为它不应该以“开头并以”结尾,这会导致错误。有没有办法排除“?