Created
September 21, 2011 20:48
-
-
Save sfrdmn/1233255 to your computer and use it in GitHub Desktop.
DAI 523 - 9/21 - Modify 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
// 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)"); | |
d3.select("#red").selectAll("circle") | |
.attr("cx", 150 ); | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment