-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathd3-layout-pie.html
36 lines (31 loc) · 969 Bytes
/
d3-layout-pie.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>d3.layout.pie</title>
<link rel="stylesheet" href="d3.css" >
<script type="text/javascript" src="http://cdnjs.cloudflare.com/ajax/libs/d3/3.4.8/d3.min.js"></script>
<script type="text/javascript" src="https://code.jquery.com/jquery-1.11.1.min.js"></script>
</head>
<body>
<h3>d3.layout.pie</h3>
<div id="error"></div>
<div class="chart" id="pie"></div>
<script src="https://gist.github.com/jywsn/d69a677bc307e25d678e.js"></script>
<script type="text/javascript">
$(function() {
var gist_url = 'https://api.github.com/gists/d69a677bc307e25d678e';
var filename = 'd3-layout-pie.js';
$.ajax({
url: gist_url,
type: 'GET',
dataType: 'jsonp'
}).success(function(response) {
eval(response.data.files[filename].content);
}).error(function() {
$('#error').html('Error getting gist content').show();
});
});
</script>
</body>
</html>