JSFiddle - React, Tailwind, and code Playground

by rexfiddle

HTML

<script src="http://code.highcharts.com/highcharts.js"></script>
<script src="http://code.highcharts.com/modules/exporting.js"></script>

<div id="container" style="min-width: 400px; height: 400px; margin: 0 auto"></div>

JavaScript

$(function () {
    var chart;
    $(document).ready(function() {
        chart = new Highcharts.Chart({
            chart: {
                renderTo: 'container',
                type: 'column'
            },
            title: {
                text: 'Quiz Score by Students'
            },
            subtitle: {
                text: 'Quiz Name'
            },
            xAxis: {
                categories: ['0 - 20%', '21 - 40%', '41 - 60%', '61 - 80%', '81 - 100%'],
                title: {
                    text: 'Quiz Score Percentage'
                }
            },
            yAxis: {
                min: 0,
                title: {
                    text: 'Number of Students'
                },
                labels: {
                    overflow: 'justify'
                }
            },
            tooltip: {
                formatter: function() {
                    return this.y + ' Students';
                }
            },
            plotOptions: {
                bar: {
                    dataLabels: {
                        enabled: true
                    }
                }
            },
            legend: {
                layout: 'vertical',
                align: 'right',
                verticalAlign: 'top',
                x: -100,
                y: 100,
                floating: true,
                borderWidth: 1,
                backgroundColor: '#FFFFFF',
                shadow: true
            },
            credits: {
                enabled: false
            },
            series: [{
                showInLegend: false,
                data: [2,5,6,2,1]
            }]
        });
    });
    
});