Age distribution

by Kathryn Atwood

HTML

<script src="https://code.highcharts.com/highcharts.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>

JavaScript

$(function () {
    $('#container').highcharts({

        chart: {
            type: 'column'
        },

        title: {
            text: 'Age Distribution by Faculty and Staff, Spring 2016'
        },

        xAxis: {
            categories: ['70+', '60-69', '50-59', '40-49', '30-39', '20-29', '19 and below']
        },

        yAxis: {
            allowDecimals: false,
            min: 0,
            title: {
                text: 'Number of Employees'
            }
        },

        plotOptions: {
            column: {
                stacking: 'normal'
            }
        },

        series: [{
            name: 'Faculty',
            data: [55, 155, 163, 136, 91, 4, 0],
            stack: 'Faculty'
        }, {
            name: 'Staff',
            data: [30, 140, 271, 216, 237, 237, 5],
            stack: 'Staff'
        }]
    });
});