Skip to content
Switch branches/tags
Go to file
Cannot retrieve contributors at this time
<!doctype html>
<html class="no-js" lang="en">
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Bar Chart</title>
<link rel="stylesheet" href="css/foundation.css" />
<script src="js/vendor/modernizr.js"></script>
<style type="text/css">
svg g.axis {
font-size: .75em;
font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
svg g.axis text.label {
font-size: 2em;
font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
svg g.axis path,
svg g.axis line {
fill: none;
stroke: black;
shape-rendering: crispEdges;
#question1, #question2 {
margin-bottom: 50px;
<nav class="top-bar" data-topbar>
<ul class="title-area">
<li class="name">
<h1><a href="#">D3 Demos</a></h1>
<div class="row">
<div class="large-12 columns">
<h1>Reusable Bar Chart</h1>
<div class="row">
<div class="large-8 columns">
<p>This demo shows how to create a reusable bar chart.</p>
<p>This data is sourced from <a href="">Gapminder</a>.</p>
<div class="row">
<div class="large-12 columns">
<p><strong>What do you think is the life expectancy in the world as a whole today?</strong></p>
<div id="question1">
<div class="row">
<div class="large-12 columns">
<p><strong>What percentage of adults in the world today are literate – can read and write?</strong></p>
<div id="question2">
<script src="js/vendor/jquery.js"></script>
<script src="js/foundation.min.js"></script>
<script src="js/d3/d3.js"></script>
<!-- Custom Example Code -->
<script src="js/d3/bar_chart.js"></script>