使用HighCharts中的选项的多条打印线

使用HighCharts中的选项的多条打印线,highcharts,Highcharts,我正在使用highcharts在同一页上构建三个图表,并希望在它们上显示多个绘图线。我的当前代码仅渲染最后一个打印线值(如果删除括号,则渲染第一个值)。例如: options.xAxis.plotLines[0] = ({value: 17.53, color: '#444', width: 1, dashStyle: 'solid'}, {value: 29.52, color: '#444', width: 1, dashStyle: 'solid'}); 任何帮助都会很好 完整代码(删除

我正在使用highcharts在同一页上构建三个图表,并希望在它们上显示多个绘图线。我的当前代码仅渲染最后一个打印线值(如果删除括号,则渲染第一个值)。例如:

options.xAxis.plotLines[0] = ({value: 17.53, color: '#444', width: 1, dashStyle: 'solid'}, {value: 29.52, color: '#444', width: 1, dashStyle: 'solid'});
任何帮助都会很好

完整代码(删除数据)


无标题文件
$(文档).ready(函数(){
Highcharts.setOptions({
图表:{
背景颜色:空
}
});
变量选项={
图表:{
类型:'areaspline'
},
标题:{
文字:“路线”
},
打印选项:{
面积样条曲线:
{
lineColor:null,
fillColor:'绿色',
线宽:0,
标记:{
已启用:false
}
}
},
信用证:{已启用:错误},
亚克斯:{
分:0,,
像素间隔:30,
gridLineColor:null,
线条颜色:'#333',
标题:{text:null},
标签:{enabled:true},
图例:{enabled:false},
标题:{
文本:空
}
},
xAxis:{
绘图线:[]
},
系列:[{
showInLegend:false
},
]
};
options.chart.renderTo='Chart1';
options.title.text='Chart1';
options.series[0]。数据=[[0.05,75]…//数据];
options.plotOptions.areaspline.fillColor='#0066CC';
options.xAxis.plotLines[0]=({value:15.44,颜色:'#444',宽度:1,dashStyle:'solid'},{value:18.23,颜色:'#444',宽度:1,dashStyle:'solid'});
var chart1=新的Highcharts.图表(选项);
options.chart.renderTo='Chart2';
options.title.text='Chart2';
options.series[0]。数据=[[0.05,75]…//数据];
options.plotOptions.areaspline.fillColor='#FF0033';
options.xAxis.plotLines[0]=({value:17.53,颜色:'#444',宽度:1,dashStyle:'solid'},{value:29.52,颜色:'#444',宽度:1,dashStyle:'solid'});
var chart2=新的Highcharts.图表(选项);
options.chart.renderTo='Chart3';
options.title.text='Chart3';
options.series[0]。数据=[[0.05,79]…//数据];
options.plotOptions.areaspline.fillColor='#48BC26';
var chart3=新的Highcharts.图表(选项);
})

我算出来了。需要推送的绘制线值:

options.xAxis.plotLines.push
options.xAxis.plotLines.push