score:13

Accepted answer

This actually turns out to be a much sought after question/answer. Since Highcharts V2.2, it is possible to assign "showEmpty: false" to y axis definitions and this will ensure that when hidden, the Y-axis text label is also hidden. Example snippet of config below:

                 yAxis: [{
                min: 0,
                showEmpty: false,
                labels: {
                    formatter: function() {
                        return this.value;
                    },
                    style: {
                        color: '#3366CC'
                    }
                },
                title: {
                    text: 'Clicks',
                    style: {
                        color: '#3366CC'
                    }
                },
                id: 'Clicks'
            }, 
                 ...

I have read reports where this showEnabled = false breaks if both min and max are also set. In the case above, where only min is set, it worked well for me using Highcharts V3.0.5

score:0

@arcseldon, it is true that showEnabled = false breaks if both min and max are also set. A possible workaround in this case is to set floor and max instead

score:1

you can use yAxis.setTitle() and set/remove the title when needed.

here is the api documentation link


Related Query

More Query from same tag