JSFiddle - React, Tailwind, and code Playground

by Kesav Telaprolu

HTML

<script src="https://code.highcharts.com/6.1.1/highcharts.js"></script>
<div id="container" style="min-width: 310px; height: 400px; margin: 0 auto"></div>

JavaScript

$(function () {
        $('#container').highcharts({
            chart: {
                type: 'column',
                height: 500,
                spacingBottom: 15,
                spacingTop: 20,
                spacingLeft: 5,
                spacingRight: 15,
                borderWidth: 1,
                borderColor: '#ddd'
            },
            title: {
                text: 'Column chart with negative values'
            },
            xAxis: {
                categories: ['Apples', 'Oranges', 'Pears', 'Grapes', 'Bananas']
            },
            credits: {
                enabled: false
            },
            plotOptions: {
                series: {
                    stacking: 'normal',
                    dataLabels:{
                			enabled: true,
                      crop: false,
                      overflow: 'allow',                      
                      allowOverlap: true
                	}
                }              
               
            },
            series: [{
                name: 'John',                
                data: [
               1, {
                  y: 3,
                  
                  dataLabels:{
                    inside:true,
                    color:"white",
                    y:-10,
                  }	
                }, {
                  y: 0.5,
                  dataLabels:{
                    inside:false
                  }	
                }, 3, {
                  y: 0.1,
                  dataLabels:{
                    inside:false
                  }	
                }],
                
            }, {
                name: 'Jane',
                data: [1, {
                  y: 1,
                  dataLabels:{
                    y:15
                  }	
                }, 0.8, 1.2, 1.1],
                 dataLabels: {
                   inside:true              
                }
            },
            {
                name: 'Jude',               
...