Built with blockbuilder.org
Last active
October 7, 2019 03:02
-
-
Save jwilber/ec7cbc374c2dc61b255494511e7d7ac6 to your computer and use it in GitHub Desktop.
roughViz Line 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> | |
<!-- Error1: When no x: attribute explicitly defined, it doesn't know where to position labels. | |
Error2: Axes not showing for some reason. Maybe I'll just move them to the front--> | |
<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> | |
let ttop = 50; | |
let rright = 20; | |
let bbottom = 45; | |
let width = 300; | |
new roughViz.Line( | |
{ | |
element: '#vis0', | |
data: 'https://raw.githubusercontent.com/jwilber/random_data/master/tweets.csv', | |
title: 'Line Chart', | |
// x: 'gdpPercap', | |
y: 'favorites', | |
y2: 'retweets', | |
y3: 'tweets', | |
yLabel: 'hey', | |
colorVar: 'continent', | |
highlightLabel: 'country', | |
highlight: 'red', | |
fillWeight: 2, | |
roughness: 3.5, | |
width: window.innerWidth / 1.2, | |
height: 500, | |
} | |
); | |
</script> | |
</body> | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment