score:2

Accepted answer

i wasn't going to post this question at first because i just found the answer (after searching in the docs for a while) but i figured this could help others.

simply make sure you add the formatter callback in your labels object:

  yaxis: {
    labels:{
      formatter: function(){
        if(this.value >= 0){
          return this.value;
        }
      }
    }
  }

http://api.highcharts.com/highcharts#yaxis.labels.formatter

score:3

while your solution works, there is a slightly more generic solution you might like if your intent is always to prevent the yaxis having a label at the bottom left:

yaxis: {
    labels: {
        formatter: function() {
            if ( this.isfirst ) { return ''; }
            return this.value;
        }
    }
},

making use of the isfirst property that highcharts has on this prevents your reliance on "magic numbers" (similarly, there is an islast value if you'd like to try that -- though i don't see as much use for it).


Related Query