JSFiddle - React, Tailwind, and code Playground

by Plippie Plop

HTML

<script src="http://www.pureexample.com/js/flot/jquery.flot.min.js"></script>
<script src="http://www.pureexample.com/js/flot/jquery.flot.pie.min.js"></script>
<div id="placeholder" style="width:500px;height:400px;"></div>

JavaScript

datapie = [
    {label: "One",  data: 50, color: '#e1ab0b'},
    {label: "Two",  data: 65, color: '#fe0000'},
    {label: "Three",  data: 23, color: '#93b40f'},
     {label: "Three",  data: 13, color: '#93000f'}
];

$.plot($("#placeholder"), datapie, { 
    series: {
         pie: {
             show: true,
             label: {
             
                 show: true,
                 radius:2/3,
                 threshold:"0.05",
                 formatter: function(label,point){
                     return(point.percent.toFixed(2) + '%');
                     
                 }
             }
        }
    },        
    legend: {show: true}
});