set two series for one category in column range chart - Javascript highcharts

Javascript examples for highcharts:Column Chart

Description

set two series for one category in column range chart

Demo Code

ResultView the demo in separate window

<html>
   <head> 
      <meta name="viewport" content="width=device-width, initial-scale=1"> 
      <script type="text/javascript" src="https://code.jquery.com/jquery-1.9.1.js"></script> 
      <script type="text/javascript">
$(function () {/*  w  w  w .  j a va  2 s  .  c o  m*/
    $('#container').highcharts({
        chart: {
            type: 'columnrange',
            inverted: true
        },
        title: {
            text: 'Temperature variation by month'
        },
        subtitle: {
            text: 'Observed in Vik i Sogn, Norway'
        },
        xAxis: {
            categories: ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec']
        },
        yAxis: {
            title: {
                text: 'Temperature ( ?C )'
            }
        },
        tooltip: {
            valueSuffix: '?C'
        },
        plotOptions: {
            columnrange: {
                grouping:false,
                dataLabels: {
                    enabled: true,
                    formatter: function () {
                        return this.y + '?C';
                    }
                }
            }
        },
        legend: {
            enabled: false
        },
        series: [{
            name: 'Temperatures',
            data: [
                [-9.7, 9.4],
                [-8.7, 6.5],
                [-3.5, 9.4]
            ]
        },{
            name: 'Temperatures',
            data: [
                [9.4, 12],
                [6.5, 8],
                [9.4,10]
            ]
        }]
    });
});

      </script> 
   </head> 
   <body> 
      <script src="https://code.highcharts.com/highcharts.js"></script> 
      <script src="https://code.highcharts.com/highcharts-more.js"></script> 
      <script src="https://code.highcharts.com/modules/exporting.js"></script> 
      <div id="container" style="min-width: 310px; height: 400px; margin: 0 auto"></div>  
   </body>
</html>

Related Tutorials