xAxis 上的以下 plotLine 对象正在向两个窗格添加线条如何使此代码仅在第一个窗格中添加一行?不影响其余窗格剧情乐队也一样谢谢
这是代码
xAxis: {
plotLines: [{
value: 1180656000000,
color: 'green',
dashStyle: 'shortdash',
width: 2,
label: {
text: 'prerinse'
}
}, {
value: 1256227606000,
color: 'red',
dashStyle: 'shortdash',
width: 2,
label: {
text: 'postrinse'
}
}]
},
yAxis: [{
title: {
text: 'OHLC',
},
height: 200,
lineWidth: 2
}, {
title: {
text: 'Volume'
},
top: 300,
height: 100,
plotLines: [{value:500}],
offset: 0,
lineWidth: 2
}],
series: [{
type: 'candlestick',
name: 'AAPL',
data: ohlc,
dataGrouping: {
units: groupingUnits
}
}, {
type: 'column',
name: 'Volume',
data: volume,
yAxis: 1,
dataGrouping: {
units: groupingUnits
}
series: [{
type: 'candlestick',
name: 'AAPL',
data: ohlc,
dataGrouping: {
units: groupingUnits
}
},
{
type: 'column',
name: 'newline',
data: newdata,
yAxis: 1, <-This
dataGrouping: {
units: groupingUnits
},
{
type: 'column',
name: 'Volume',
data: volume,
yAxis: 1,
dataGrouping: {
units: groupingUnits
}
这会将第二个窗格添加到 y 轴。如果将代码中的点线更改为"xAxis: 0",则新窗格将添加到 x 轴。