Built with blockbuilder.org
forked from jwilber's block: roughViz Line Demo
license: mit |
Built with blockbuilder.org
forked from jwilber's block: roughViz Line Demo
<!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> | |