Skip to content
Permalink
Branch: master
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
74 lines (71 sloc) 2.07 KB
<!doctype html>
<html class="no-js" lang="en">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Responsive Pie Chart</title>
<link rel="stylesheet" href="css/foundation.css" />
<script src="js/vendor/modernizr.js"></script>
<style type="text/css">
.svg-container {
display: inline-block;
position: relative;
width: 100%;
padding-bottom: 100%;
vertical-align: middle;
overflow: hidden;
}
.svg-content {
display: inline-block;
position: absolute;
top: 0;
left: 0;
}
</style>
</head>
<body>
<nav class="top-bar" data-topbar>
<ul class="title-area">
<li class="name">
<h1><a href="#">D3 Demos</a></h1>
</li>
</ul>
</nav>
<div class="row">
<div class="large-12 columns">
<h1>Responsive Pie Chart</h1>
</div>
</div>
<div class="row">
<div class="large-8 columns">
<p>This demo shows how to create a responsive pie chart.</p>
<p>This data is sourced from <a href="http://www.gapminder.org/GapminderMedia/wp-uploads/Results-from-the-Ignorance-Survey-in-the-US..pdf">Gapminder</a>.</p>
</div>
</div>
<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>
</div>
<div class="row">
<div class="medium-6 columns">
<fieldset>
<ul id="pieLegend" class="no-bullet">
</ul>
</fieldset>
</div>
<div class="medium-6 columns">
<div id="pieChart" class="svg-container">
</div>
</div>
</div>
<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/responsive_pie.js"></script>
<script>
$(document).foundation();
</script>
</body>
</html>
You can’t perform that action at this time.