title: Highcharts - append % to first axis label?
body: <p>When styling a chart axis, a common style in publications is to include the unit or percentage sign only on the topmost label of the Y-axis. I am trying to figure out how to do this in Highcharts.</p>
  
  <p>I know I can hard-code a number, like this:</p>
  
  <pre><code> yAxis: {
      labels: {
          formatter: function() {
              if ( this.value == 12 ) {
                 return this.value + "%";
              } else {
                 return this.value;
              }
          }
      },
  </code></pre>
  
  <p>But this is not a very flexible solution.</p>
  
  <p>Is there a way to test for the first (or nth) value displayed? Is there a way to get the index of a value within the formatter function?</p>
  
  <h2>2013 Update</h2>
  
  <p>This works in most circumstances: </p>
  
  <pre><code>if ( this.value == this.axis.getExtremes().max )
      return this.value + '%';
  else 
      return this.value;
  </code></pre>
  
  <p>However, it does <em>not</em> work if you have <code>yAxis.endOnTick</code> set to false—because in that case the maximum <strong>value</strong> of the axis is not the same as the highest <strong>label</strong> on the axis.</p>
  
  <p>Is there a way to get that highest <strong><em>label</em></strong> from within the formatter function?</p>