JSFiddle - React, Tailwind, and code Playground
by chaosmail
HTML
<script src="https://rawgithub.com/mbostock/d3/v3.2.8/d3.min.js"></script>
<script src="https://rawgithub.com/chaosmail/dchart/master/dist/dchart.min.js"></script>
<div id="pieChart2">
JavaScript
var pieChart2 = new dChart.PieChart({
elem: 'pieChart2',
width: 700,
height: 400,
label: "Another Pie Chart Example",
marginLeft: 0,
marginRight: 0,
marginTop: 0,
marginBottom: 40,
transition: {
duration: 500,
delay: 250
},
dataSets: [
{
label: "Random Dataset Pie Chart",
dataFn: {
fn: function() { return Math.random()*100 },
min: 0,
max: 3,
step: 1
}
},
{
label: "Another random Dataset Pie Chart",
dataFn: {
fn: function() { return Math.random()*100 },
min: 0,
max: 6,
step: 1
}
}
]
});