This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var title = document.getElementById("title"); | |
title.parentNode.removeChild(title); | |
function square( x ) { | |
return x * x; | |
} | |
pino.buildWall = function( n ) { | |
var wall = document.getElementById("wall"); | |
var i = 0; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="utf-8"?> | |
<svg version="1.1" | |
baseProfile="full" | |
xmlns="http://www.w3.org/2000/svg" | |
xmlns:xlink="http://www.w3.org/1999/xlink" | |
xmlns:ev="http://www.w3.org/2001/xml-events"> | |
<!-- ENTER YER STUFF HERE. DELETE THIS LINE --> | |
</svg> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!-- DELETE ME --> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// The following line selects all circles on the page and changes their stroke-width to 10 (px) | |
d3.selectAll("circle").attr("stroke-width", 10) | |
// Two slashes means "comment". Commented code is not run. | |
// It is good to comment your code so you remember what's going on. | |
// d3.selectAll("circle").attr("fill", "blue"); | |
// The following lines deal with making selections and then sub selections within those selections | |
d3.selectAll("circle").attr("stroke-width", 10); | |
d3.select("#blue").selectAll("circle").attr("stroke","rgb(34,56,35)"); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
d3.select("body").append("svg:svg").attr("width", 3000).attr("height",500); | |
var chart = d3.select("svg"); | |
var fill = d3.scale.category20(); | |
d3.json("data/dataset1.json", function(json) { | |
var size = function(d,i) { | |
return d.size; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
Yo doods. This code creates a bubble chart. It's unfinished, so you gotta finish it. | |
Use the comments I left to figure things out. Comments are specified by two slashes // | |
Multiple line comments begin with /asterix and end with asterix/ | |
Commented code does not run. | |
;\ | |
|' \ | |
_ ; : ; | |
/ `-. /: : | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
Hey. We're going to continue with this bubble chart we were working on last class. | |
Here is some motivational ASCII. | |
,. _~-., . YOU'RE BEAUTIFUL! | |
~'`_ \/,_. \_ | |
/ ,"_>@`,__`~.) | . | |
| | @@@@' ",! . . ' | |
|/ ^^@ .! \ | / |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// If you rename your script, don't forget to change the <script> tag in the HTML file!!! | |
var w = 800; // width | |
var h = 600; // height | |
var marginT = 20; | |
var marginL = 20; | |
/* | |
First append SVG to the body | |
*/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
label | area | |
---|---|---|
ca | 23 | |
ma | 456 | |
ne | 567 | |
ba | 345 | |
ya | 34 | |
na | 21 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
label | area | |
---|---|---|
max | 23 | |
jenny | 456 | |
lenny | 567 | |
mark | 345 | |
angel | 34 | |
aurelio | 21 |
OlderNewer