JSFiddle - React, Tailwind, and code Playground

HTML

<script type="text/javascript" src="http://highcharts.com/js/testing.js"></script>

<div id="container" style="height: 300px"></div>

JavaScript

var chart = new Highcharts.Chart({

    chart: {
        renderTo: 'container',
        marginRight: 150 // make room for the legend
    },

    xAxis: {
        categories: ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec']
    },
    
    legend: {
        enabled: false
    },

    series: (function() {
        var series = [];
        for (var i = 0; i < 20; i++) {
            var data = [];
            for (var j = 0; j < 12; j++) {
                data.push(Math.random());
            }
            series.push({
                name: 'Location '+ (i + 1),
                data: data
            });
        }
        return series;
     })()
    }, function(chart) {
        var options = chart.options.legend;
        console.log(options);
        /**
         * What happens when the user clicks the legend item
         */
        function clickItem(series, $legendItem, $line) {
            series.setVisible();
            $legendItem.css(
                options[series.visible ? 'itemStyle' : 'itemHiddenStyle']
            );
            if(series.visible)
                $legendItem.css({color: series.color});
            $line.css({
                borderTop: '2px solid '+ (series.visible ? series.color : 
                                             options.itemHiddenStyle.color)
            });
        }
        // Create the legend box
        var $legend = $('<div>')
            .css({
                width: 110,
                maxHeight: 210,
                padding: 10,
                position: 'absolute',
                overflow: 'auto',
                right: 10,
                top: 40,
                borderColor: options.borderColor,
                borderWidth: options.borderWidth,
                borderStyle: 'solid',
                borderRadius: options.borderRadius
            })
            .appendTo(chart.container);
        

        $.each(chart.series, function(i, series) {
            // crete the...