color on each data in columnrange bar - Javascript highcharts

Javascript examples for highcharts:Column Chart

Description

color on each data in columnrange bar

Demo Code

ResultView the demo in separate window

<html>
   <head> 
      <meta name="viewport" content="width=device-width, initial-scale=1"> 
      <script type="text/javascript">
    window.onload=function(){/*from  w w  w.  ja  v a  2 s. c  o m*/
$(function () {
    $('#container').highcharts({
        chart: {
            type: 'columnrange',
            inverted: true,
            renderTo: 'container',
        },
        tooltip: {
            pointFormat: ""
        },
        title: {
            text: ''
        },
        credits: {
            enabled: false
        },
        xAxis: {
            type: 'datetime',
            categories:['1','2']
        },
        yAxis:{
            labels: {
                enabled: false
            },
            title: {
                text: 'Months'
            }
        },
        series: [{
            data: [
                { low: Date.UTC(2015, 10, 01), high: Date.UTC(2015, 02, 04), color: 'red' },
                { low: Date.UTC(2014, 10, 01), high: Date.UTC(2014, 02, 04), color: 'blue' },
            ]
        }],
        legend: {
            enabled: false
        },
        exporting: {
            enabled: false
        }
    });
});
    }

      </script> 
   </head> 
   <body> 
      <script src="https://code.jquery.com/jquery-2.2.0.min.js"></script> 
      <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: 400px; height: 400px; margin: 0 auto"></div>  
   </body>
</html>

Related Tutorials