title: highcharts - How do I show/hide secondary y axis based on optional parameter
body: <p>I am trying to functionalize my highchart code and I am struggling to understand how can I make a secondary y Axis drawn based on a conditional if statement such as the code below: </p>
  
  <pre><code> 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;
                    }
                } 
  
            }],
  </code></pre>