Built with blockbuilder.org
forked from jwilber's block: roughViz BarH Demo
license: mit |
Built with blockbuilder.org
forked from jwilber's block: roughViz BarH Demo
<!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.BarH( | |
{ | |
element: '#vis0', | |
title: "Vehicles I've Had", | |
titleFontSize: '1.5rem', | |
legend: false, | |
margin: {top: 50, bottom: 100, left: 160, right: 0}, | |
data: { | |
labels: ['1992 Ford Aerostar Van', '2013 Kia Rio', '1980 Honda CB 125s', '1992 Toyota Tercel'], | |
values: [8, 4, 6, 2] | |
}, | |
xLabel: 'Time Owned (Years)', | |
strokeWidth: 2, | |
fillStyle: 'zigzag-line', | |
highlight: 'gold', | |
} | |
); | |
new roughViz.BarH( | |
{ | |
element: '#vis1', | |
titleFontSize: '1.5rem', | |
// margin: {top: 50, bottom: 100, left: 60, right: 0}, | |
data: 'https://raw.githubusercontent.com/jwilber/random_data/master/owTanks.csv', | |
color: 'tan', | |
labels: 'name', | |
values: 'health', | |
title: "Overwatch Tank Health", | |
roughness: 4, | |
} | |
); | |
</script> | |
</body> | |