Commit ec78cbaa authored by O'Reilly Media, Inc's avatar O'Reilly Media, Inc
Browse files

Initial commit

parents
Loading
Loading
Loading
Loading
+5 −0

File added.

Preview size limit exceeded, changes collapsed.

+15 −0
Changes for Learning to Visualize Data with D3 - Working Files/Chapter 1/Using the project template/index.html: 15 added lines, 0 removed lines.
Original line number Diff line number Diff line
<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<title>Learning D3</title>
	<link rel="stylesheet" href="main.css">
	<script  type="text/javascript" src="d3.min.js"></script>
</head>
<body>
<!--Place all DOM elements here -->
<script>
//Write your code here
</script>	
</body>
</html>
 No newline at end of file
+11 −0
Changes for Learning to Visualize Data with D3 - Working Files/Chapter 1/Using the project template/main.css: 11 added lines, 0 removed lines.
Original line number Diff line number Diff line
body,html{
	margin: 0;
	padding: 0;
	font-family: "Arial", sans-serif;
	font-size: 0.95em;
	text-align: center;
}
#chart{
	background-color: #F5F2EB;
	border: 1px solid #CCC;
}
 No newline at end of file
+5 −0

File added.

Preview size limit exceeded, changes collapsed.

+36 −0
Changes for Learning to Visualize Data with D3 - Working Files/Chapter 2/Reviewing Arrays and Objects/index.html: 36 added lines, 0 removed lines.
Original line number Diff line number Diff line
<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<title>Learning D3</title>
	<link rel="stylesheet" href="main.css">
	<script  type="text/javascript" src="d3.min.js"></script>
</head>
<body>
<!--Place all DOM elements here -->
<script>
//Write your code here
var data = [132,71,337,93,78,43,20,16,30,8,17,21];
//console.log(data[0])

var donut = {key: "Glazed", value: 132};
//console.log(donut.key, donut.value);

var donuts = [
	{key: "Glazed", 	value: 132},
	{key: "Jelly", 		value: 71},
	{key: "Holes", 		value: 337},
	{key: "Sprinkles",	value: 93}
];
//console.log(donuts[1].key, donuts[1].value);

for(var i = 0, len = donuts.length; i < len; i++){
	console.log(donuts[i].key, donuts[i].value);
}

donuts.forEach(function(entry){
	console.log(entry.key, entry.value);
});
</script>	
</body>
</html>
 No newline at end of file
Loading