JSFiddle - React, Tailwind, and code Playground

by Kondal Durgam

HTML

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

    <script src="https://code.highcharts.com/highcharts.js"></script>
    <script src="https://code.highcharts.com/highcharts-more.js"></script>
    <script src="https://code.highcharts.com/modules/exporting.js"></script>

JavaScript

const colors = Highcharts.getOptions().colors
Highcharts.chart('container', {
    chart: {
        type: 'column'
    },
    title: {
        text: 'Internship Program Health',
        align: 'left',
        x: 30
    },
    credits: {
        enabled: false
    },
    xAxis: {
        categories: ['Positions Opened', 'Positions Closed']
    },
    yAxis: {
        min: 0,
        title: {
            text: ''
        },

        stackLabels: {
            enabled: false,

        }
    },
    legend: {
        align: 'right',
        x: -10,
        verticalAlign: 'top',
        y: 1,
        floating: true,
        borderColor: '#CCC',
        borderWidth: 1,
        shadow: false
    },
    exporting: { 
            	enabled: false
             },
    //yAxis: [{
        //gridLineColor: '#ed7d31',
        //lineColor: '#F3F5F6',
        //minorGridLineColor: '#ed7d31',
        //tickColor: '#F3F5F6',
        //plotLines: [{
         //   color: '#ed7d31'
       // }],

        //labels: {
         //   format: '{value} %'
       // },

        //min: 0,
        //max: 60,
        //opposite: false
    //}],
    tooltip: {
        headerFormat: '<b>{point.x}</b><br/>',
        pointFormat: '{series.name}: {point.y}<br/>Total: {point.stackTotal}'
    },
    plotOptions: {
        column: {
            stacking: 'percent',
            dataLabels: {
                enabled: false,

            }
        }
    },
    series: [{
        name: 'Male',
        color: colors["4"],
        data: [5, 8]
    }, {
        color: colors["7"],
        name: 'Female',
        data: [3, 5]
    }]
});