我正在尝试功能化我的高图代码,我正在努力理解如何根据条件if语句(如下面的代码)绘制辅助y轴:
yAxis: [{ // Primary yAxis shown for all charts
min: 0,
labels: {
format: '{value} pcks ',
style: {
color: '#4572A7'
}
},
title: {
text: 'Volume',
style: {
color: '#4572A7'
}
}
}, { // Secondary yAxis make this optional based on AxisNum accepted values:1/2
formatter: function(){
if(AxisNum === 2])
{
gridLineWidth: 0, min:0, title: { text: 'Cycle Time', style: { color: '#C88622' } }, labels: {format: '{value} days',style: {color: '#C88622'}},opposite: true;
}
}
}],
答案 0 :(得分:1)