JSFiddle - React, Tailwind, and code Playground

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

JavaScript

$(function () {
    
    var options = {

        chart: {
            type: 'column'
        },

        title: {
            text: 'Total fruit consumtion, grouped by gender'
        },

        xAxis: {
            categories: ['Apples', 'Oranges', 'Pears', 'Grapes', 'Bananas']
        },

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

        tooltip: {
            formatter: function () {
        
                return '<b>' + this.x +  ' ' + this.series.options.stack +  '</b><br/>' +
                    this.series.name + ': ' + this.y + '<br/>' +
                    'Total: ' + this.point.stackTotal;
            }
        },

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

        series: [{
            name: 'John',
            color: '#ff4400',
            data: [5, 3, 4, 7, 2],
            stack: '2014'
        }, {
            name: 'Joe',
            color: '#44ff00',
            data: [3, 4, 4, 2, 5],
            stack: '2014'
        }, {
            name: 'John',
            color: '#ff4400',
            data: [2, 5, 6, 2, 1],
            showInLegend: false,
            stack: '2015'
        }, {
            name: 'Joe',
            data: [3, 0, 4, 4, 3],
            color: '#44ff00',
            showInLegend: false,
            stack: '2015'
        }]
    };
    
    var onLegendClick= function (event) {
	     	    		                	var myname = this.name;
	     	    		                	var myvis  = !this.visible;
	     	    		                	this.chart.series.forEach( function (elem) {
	     	    		                		if (elem.name == myname) {
	     	    		                			elem.setVisible(myvis);
	     	    		                		}
	     	    		                	});
	     	    		                	return false;
	     	    		                }
	     	    		            
    
   ...