Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

hide YAxis values in HighChart Solid Gauge

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

like image 254
user1025852 Avatar asked Jul 04 '26 03:07

user1025852


2 Answers

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

like image 182
Rob Schmuecker Avatar answered Jul 07 '26 11:07

Rob Schmuecker


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

yAxis: {
    labels: {
        enabled: false
    }
}
like image 35
Halvor Holsten Strand Avatar answered Jul 07 '26 11:07

Halvor Holsten Strand



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!