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/jqplot.pieRenderer.min.js"></script>
<link rel="stylesheet" href="http://www.jqplot.com/deploy/dist/jquery.jqplot.min.css">
<div id="assetChart" class="assetStyle"></div>
CSS
.assetStyle{
height:50%;
width:100%;
color:red;
}
JavaScript
$(document).ready(function(){
var data = [
['Heavy Industry', 12],['Retail', 9], ['Light Industry', 14],
['Out of home', 16],['Commuting', 7], ['Orientation', 9]
];
var plot1 = jQuery.jqplot ('chart1', [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' }
}
);
});