Permalink
Browse files

added Multi-valued map example

  • Loading branch information...
1 parent 75152d3 commit 242b74bbf56bb6c12565f936259b1df147ee1db0 @vogievetsky committed Mar 14, 2013
Showing with 17 additions and 2 deletions.
  1. +13 −0 slides.coffee
  2. +4 −2 slides.js
View
@@ -107,6 +107,7 @@ slide.code_title title = ".select()"
slide.code title, rect1, """
var svg = d3.select("div.output svg")
+
var myRect = svg.select("rect")
myRect.attr("width", 100)
myRect.attr("height", 100)
@@ -116,12 +117,24 @@ myRect.style("fill", "steelblue")
slide.code title, rect1, """
var svg = d3.select("div.output svg")
+// Chain style
svg.select("rect")
.attr("width", 100)
.attr("height", 100)
.style("fill", "steelblue")
"""
+slide.code title, rect1, """
+var svg = d3.select("div.output svg")
+
+// Object map style
+svg.select("rect")
+ .attr({
+ width: 100,
+ height: 100
+ })
+ .style("fill", "steelblue")
+"""
# -----------------------------------------------
slide.code_title title = ".selectAll()"
View
Oops, something went wrong.

0 comments on commit 242b74b

Please sign in to comment.