Built with blockbuilder.org
forked from jwilber's block: roughViz Donut Demo
license: mit |
Built with blockbuilder.org
forked from jwilber's block: roughViz Donut Demo
<!DOCTYPE html> | |
<head> | |
<meta charset="utf-8"> | |
<script src="https://unpkg.com/rough-viz@1.0.4"></script> | |
<style> | |
.wrapper { | |
display: flex; | |
flex: wrap; | |
order: row; | |
} | |
</style> | |
</head> | |
<body> | |
<br><br> | |
<div class="wrapper"> | |
<div id="vis0"></div> | |
</div> | |
<script> | |
new roughViz.Donut( | |
{ | |
element: '#vis0', | |
legend: false, | |
data: { | |
labels: ['JNCO Jeans', 'Sweat Pants', 'Jorts'], | |
values: [20, 10, 2] | |
}, | |
title: 'Pants I Got Clowned On For Wearing In High School', | |
titleFontSize: '2rem', | |
labels: 'letter', | |
values: 'frequency', | |
width: window.innerWidth, | |
stroke: 'coral', | |
// strokeWidth: 3, | |
color: 'pink', | |
fillWeight: 1.5, | |
} | |
); | |
</script> | |
</body> | |