2

In the below example, is it possible to "hide" the Y Axis values - for example - do not show the 0 and the 200 (in the left). Looking for cleaner chart..

http://www.highcharts.com/demo/gauge-solid/dark-unica

Scriptable
  • 19,402
  • 5
  • 56
  • 72
user1025852
  • 2,684
  • 11
  • 36
  • 58

3 Answers3

6

By targeting the yAxis labels via CSS you can do so just fine

CSS:

.highcharts-axis-labels.highcharts-yaxis-labels{
    display:none;   
}

Or alternatively, via setting the showFirstLabel and showLastLabel property of the yAxis in the case of the gauge has the same effect.

JS:

    yAxis: {
        showFirstLabel:false,
        showLastLabel:false,
        min: 0,
        max: 5,
        title: {
            text: 'RPM'
        }
    }

Here is a demo showing both http://jsfiddle.net/robschmuecker/yra3mex6/ Here are the docs regarding the properties http://api.highcharts.com/highcharts#yAxis.showFirstLabel

Rob Schmuecker
  • 8,934
  • 2
  • 18
  • 34
3

The following code will hide the Y-axis labels (JSfiddle example):

yAxis: {
    labels: {
        enabled: false
    }
}
Halvor Holsten Strand
  • 19,829
  • 17
  • 83
  • 99
0

You can also use the 'formatter' as shown below:

labels: {
            y: 16,
            formatter: function () {
                if(this.value == 0){
                return '0B'; // your choice of value
              } else {
                return '425B'; // you can pass the empty string
              }
            }
        }
Naresh Chennuri
  • 1,133
  • 11
  • 10