JSFiddle - React, Tailwind, and code Playground

HTML

<button id="sendTest">Test</button>
    <section id="usage">
        <canvas id="seriesChart" width="400" height="100"></canvas>
        <div id="pie" style="width:300px;height:300px;"></div>
    </section>

JavaScript

function drawPie(pieDataSets) {
        console.log(pieDataSets);
        $.plot($("#pie"), pieDataSets, 
        {
            series: {
                pie: { 
                    show: true,
                    radius: 1,
                    label: {
                        show: true,
                        radius: 3/4,
                        formatter: function(label, series){
                            return '<div style="font-size:8pt;text-align:center;padding:2px;color:white;">'+label+'<br/>'+Math.round(series.percent)+'%</div>';
                        },
                        background: { 
                            opacity: 0.5,
                            color: '#000'
                        }
                    }
                },
                legend: {
                    show: false
                }
            }
        });
    };