ColumnRange center datalabels

by kzoon

HTML

<script src="http://github.highcharts.com/master/highcharts.js"></script>
<script src="http://github.highcharts.com/master/highcharts-more.js"></script>
<div id="container" style="min-width: 310px; height: 400px; margin: 0 auto"></div>

JavaScript

$(function () {

    $('#container').highcharts({

        chart: {
            type: 'columnrange',
            inverted: true
        },

  
        xAxis: {
            categories: ['Jan', 'Feb', 'Mar', 'Apr']
        },

        yAxis: {
             min:-20,
            max: 20
        },

        tooltip: {
            valueSuffix: '°C'
        },

        plotOptions: {
            columnrange: {
                dataLabels: {
                    enabled: true,
                    inside: true,
                    align: 'center'
                }
            }
        },

        legend: {
            enabled: false
        },

        series: [{
            name: 'Temperatures',
            data: [
                [-10, 10],
                [-5, 5],
                [-1, 1],
                [-50,50]
            ]
        },
          ]

    });

});