Skip to content

Instantly share code, notes, and snippets.

@jwilber
Last active October 7, 2019 03:04
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jwilber/e713c03097950d53a8cfde4c23aa292f to your computer and use it in GitHub Desktop.
Save jwilber/e713c03097950d53a8cfde4c23aa292f to your computer and use it in GitHub Desktop.
roughViz Donut Demo
license: mit
<!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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment