Built with blockbuilder.org
Created
October 7, 2019 01:37
-
-
Save jwilber/a2dccbc103d7667643f35a8c8947a390 to your computer and use it in GitHub Desktop.
roughViz Pie Demo
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
license: mit |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!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 id="vis1"></div> | |
</div> | |
<script> | |
new roughViz.Pie( | |
{ | |
element: '#vis0', | |
titleFontSize: '1.5rem', | |
margin: {top: 50, bottom: 100, left: 40, right: 100}, | |
data: { | |
labels: ['yes', 'no', 'lol idk man'], | |
values: [2, 8, 4] | |
}, | |
title: "'Yarn Plot': Useful?", | |
roughness: 25, | |
strokeWidth: 5, | |
innerStrokeWidth: 5, | |
} | |
); | |
new roughViz.Pie( | |
{ | |
element: '#vis1', | |
titleFontSize: '1.5rem', | |
legend: false, | |
margin: {top: 50, bottom: 100, left: 40, right: 100}, | |
data: { | |
labels: ['useful', 'no', 'lol idk man'], | |
values: [2, 8, 4] | |
}, | |
strokeWidth: 3, | |
fillStyle: 'zigzag-line', | |
highlight: 'gold', | |
} | |
); | |
</script> | |
</body> | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment