Skip to content

Instantly share code, notes, and snippets.



Last active Aug 22, 2019
What would you like to do?
Create a simple bar chart
license: mit
<!DOCTYPE html>
<meta charset="utf-8">
<script src=""></script>
body { margin:0;position:fixed;top:0;right:0;bottom:0;left:0; }
<svg width=900 height=500></svg>
// create a bar chart to get an understanding of how many cinnamon buns
// you eat throuhgout a week
// => SVG in MDN:
// => D3 API:
// cinnamon buns
const kanelbullarThisWeek = [
{day: 'Monday', buns: 10},
{day: 'Tuesday', buns: 20},
{day: 'Wednesday', buns: 10},
{day: 'Thursday', buns: 61},
{day: 'Friday', buns: 1},
{day: 'Saturday', buns: 12},
{day: 'Sunday', buns: 2}];
const svg ="svg");
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment