JSFiddle - React, Tailwind, and code Playground

by ilapawar

HTML

<script src="http://www.jqplot.com/deploy/dist/jquery.jqplot.min.js"></script>
<script src="http://www.jqplot.com/deploy/dist/plugins/jqplot.pieRenderer.min.js"></script>
<link rel="stylesheet" href="http://www.jqplot.com/deploy/dist/jquery.jqplot.css">
<div id="assetChart"  class="assetStyle"></div>

CSS

.assetStyle{
 height:50%;
 width:100%;
}

JavaScript

$(document).ready(function(){
  var data = [
    ['Heavy Industry', 12],['Retail', 9] ];
    
  var plot1 = jQuery.jqplot ('assetChart', [data],
    {
      seriesDefaults: {
        // Make this a pie chart.
        renderer: jQuery.jqplot.PieRenderer,
        rendererOptions: {
          // Put data labels on the pie slices.
          // By default, labels show the percentage of the slice.
          showDataLabels: true
        }
      },
      legend: { show:true, location: 'e' }
    }
  );
});