Group columns in column chart

Description

The following code shows how to group columns in column chart.

Example


<!DOCTYPE html>
<html>
<head>
<script type='text/javascript'
  src='https://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js'></script>
<script type='text/javascript'>
$(function () {<!--from  www. j a  v  a 2s.  c om-->
    Highcharts.getOptions().colors = Highcharts.map(Highcharts.getOptions().colors, function (color) {
        return Highcharts.Color(color)
            .setOpacity(0.5)
            .get('rgba');
    });

    $('#container').highcharts({
        chart: {
            type: 'column'
        },
        legend: {
            layout: 'vertical',
            backgroundColor: '#FFFFFF',
            align: 'left',
            verticalAlign: 'top',
            x: 100,
            y: 70,
            floating: true,
            shadow: true
        },
        plotOptions: {
            column: {
                grouping: false,
                shadow: false
            }
        },
        series: [{
            name: 'Tokyo',
            data: [450, 70, 16],
            pointPadding: 0

        }, {
            name: 'New York',
            data: [83, 78, 98],
            pointPadding: 0.1

        }, {
            name: 'London',
            data: [48, 38, 39],
            pointPadding: 0.2

        }, {
            name: 'Berlin',
            data: [42, 33, 34],
            pointPadding: 0.3

        }]
    }); 
});
</script>
</head>
<body>
  <script src="http://code.highcharts.com/highcharts.js"></script>
  <script src="http://code.highcharts.com/highcharts-more.js"></script>
  <div id="container" style="height: 400px"></div>
</body>
</html>

Click to view the demo





















Home »
  highcharts »
    Chart by Type »




Area Chart
Bar Chart
Boxplot Chart
Bubble Chart
Column Chart
Gauge Chart
Line Chart
Pie Chart
Polar Chart
Scatter Chart
Spline Chart