Built with blockbuilder.org
Last active
November 16, 2019 21:55
roughViz Bar 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.5"></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.Bar( | |
{ | |
element: '#vis0', | |
// data: [[1,2], [5, 6], [8,8], [5, 100], [200, 10], [50, 50]], | |
data: 'https://gist.githubusercontent.com/mbostock/3310560/raw/98311dc46685ed02588afdcb69e5fa296febc1eb/letter-frequency.tsv', | |
title: 'Letters', | |
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