JSFiddle - React, Tailwind, and code Playground

by H17737

HTML

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

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

JavaScript

var dataOverviewGraph = new Highcharts.Chart({
	        chart: {
	            renderTo: 'container',
	            type: 'pie',
                plotBackgroundColor: null,
                plotShadow: false
	        },
	
	        plotOptions: {
	            pie: {
	                borderColor: '#fff',
	                borderWidth: 3,
	                innerSize: '45%',
	                shadow: false,
                    allowPointSelect: true,
                    cursor: 'pointer',
                    dataLabels: {
                        enabled: false
                    },
                    showInLegend: true
	            }
	        },
	        colors: [
	           '#00a5ff', 
	           '#bfbfbf',
                '#808080'
	        ],
	        
	        title : {
				y : 1,
				text : null, //kpiName

			},
			credits : {
				enabled : false
			},
			
			exporting: {
	            buttons: {
	
	                printButton:{
	                    enabled:false
	                },
	                exportButton: {
	                    enabled:false
	                }
	
	            }
            },
            
    
            legend: {
                enabled:true,
                borderWidth:0,
                align:'right',
                verticalAlign: 'middle',
                layout: 'vertical',
                labelFormatter: function() {
                    return '<b>'+this.y+'%</b> '+this.name.toUpperCase();
                }
			},
	        
	        
	       series: [{
                type: 'pie',
                name: 'KPI Repartition',
                data: [
                    {
                        name: "Leaders",
                        y: 20,
                        legendIndex: 1
                    },
                    {
                        name: "Laggers",
                        y: 30,
                        legendIndex: 2
                    },  
                    {
                        name: "Outliers",
                   ...