Change color of stacked column chart - Javascript highcharts

Javascript examples for highcharts:Column Chart

Description

Change color of stacked column 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://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js"></script> 
      <script type="text/javascript">
    $(window).load(function(){//from w w  w .  j  ava2s  .  c  o  m
$(function () {
    $('#chart1').highcharts({
        chart: {
            type: 'column'
        },
        title: {
            text: 'Average Use of APP in Last 30 Days'
        },
        xAxis: {
            categories: ['Client 3', 'Client 2', 'Client 3']
        },
        tooltip: {
            pointFormat: '<span style="color:{series.color}">{series.name}</span>: <b>{point.y}</b> ({point.percentage:.0f}%)<br/>',
            shared: true
        },
        plotOptions: {
            column: {
                stacking: 'percent'
            }
        },
        colors: ['#4572A7', '#AA4643'],
        series: [{
            name: 'APP Used',
            data: [259, 760, 500]
        }, {
            name: 'APP Not Used',
            data: [19, 203, 515]
        }]
    });
});
    });

      </script> 
   </head> 
   <body> 
      <script src="https://code.highcharts.com/highcharts.js"></script> 
      <div id="chart1" style="height: 400px"></div>  
   </body>
</html>

Related Tutorials