JSFiddle - React, Tailwind, and code Playground

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; max-width: 800px; height: 400px; margin: 0 auto"></div>

JavaScript

$(function () {
    $('#container').highcharts({
        chart: {
            type: 'bar'
        },
        title: {
            text: 'Fall Disenrollments 2011-2015'
        },
        xAxis: {
            categories: ['2011', '2012', '2013', '2014', '2015']
        },
        yAxis: {
            min: 0,
            title: {
                text: 'Total number of students disenrolled'
            }
        },
        legend: {
            reversed: true
        },
        plotOptions: {
            series: {
                stacking: 'normal'
            }
        },
        series: [{
            name: 'Returned',
            data: [201, 146, 180, 145, 167]
        }, {
            name: 'Did not re-enroll',
            data: [108, 58, 104, 84, 91]
        }]
    });
});