Highcharts Demo

author(s): Torstein Hønsi

by kzoon

HTML

<script src="https://code.jquery.com/jquery-3.1.1.min.js"></script>
<script src="https://code.highcharts.com/highcharts.js"></script>

<div id="container"></div>

CSS

#container {
	height: 400px;
	min-width: 320px;
	max-width: 800px;
	margin: 0 auto;
}

JavaScript

Highcharts.chart('container', {

    title: {
        text: 'Demo of reusing but modifying default X axis label formatter'
    },

    subtitle: {
        text: 'X axis labels should have thousands separators'
    },

    yAxis: {
        labels: {
            formatter: function () {
                if(this.isFirst || this.isLast ){
                return this.axis.defaultLabelFormatter.call(this);
                } else {
                return null;
                }
   
            }
        }
    },

    series: [{
        data: [-29.9, 71.5, 106.4, 129.2, 144.0, 176.0, 135.6, 148.5, 216.4, 194.1, 95.6, 54.4],
        pointStart: 9000,
        type: 'column'
    }]

});