Built with blockbuilder.org
Created
October 3, 2019 17:52
-
-
Save jwilber/2a83c9c6007d9cc90be2de46e8268347 to your computer and use it in GitHub Desktop.
roughViz roughness examples
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://d3js.org/d3.v4.min.js"></script> --> | |
<script src="https://unpkg.com/rough-viz@1.0.1"></script> | |
<style> | |
.wrapper { | |
display: flex; | |
flex: wrap; | |
} | |
</style> | |
</head> | |
<body> | |
<div class="wrapper"> | |
<div class="vis0"></div> | |
<div class="vis1"></div> | |
<div class="vis3"></div> | |
<div class="vis4"></div> | |
<div class="vis5"></div> | |
<div class="vis6"></div> | |
<div class="vis7"></div> | |
<div class="vis8"></div> | |
<div id="vis1"></div> | |
</div> | |
<div id="vis2"></div> | |
<!-- <div id="vis0"></div> --> | |
<script> | |
for (let i=0; i < 9; i++) { | |
new roughViz.Pie( | |
{ | |
element: '.vis' + i, | |
data: 'https://raw.githubusercontent.com/jwilber/random_data/master/flavors.csv', | |
labels: 'flavor', | |
values: 'price', | |
legend: false, | |
roughness: i * 2., | |
highlight: 'gold', | |
fillWeight: 4., | |
fillStyle: 'zigzag', | |
width: window.innerWidth / 8.5, | |
} | |
); | |
} | |
</script> | |
</body> | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment