Skip to content

Commit

Permalink
added Multi-valued map example
Browse files Browse the repository at this point in the history
  • Loading branch information
vogievetsky committed Mar 14, 2013
1 parent 75152d3 commit 242b74b
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 2 deletions.
13 changes: 13 additions & 0 deletions slides.coffee
Expand Up @@ -107,6 +107,7 @@ slide.code_title title = ".select()"
slide.code title, rect1, """ slide.code title, rect1, """
var svg = d3.select("div.output svg") var svg = d3.select("div.output svg")
var myRect = svg.select("rect") var myRect = svg.select("rect")
myRect.attr("width", 100) myRect.attr("width", 100)
myRect.attr("height", 100) myRect.attr("height", 100)
Expand All @@ -116,12 +117,24 @@ myRect.style("fill", "steelblue")
slide.code title, rect1, """ slide.code title, rect1, """
var svg = d3.select("div.output svg") var svg = d3.select("div.output svg")
// Chain style
svg.select("rect") svg.select("rect")
.attr("width", 100) .attr("width", 100)
.attr("height", 100) .attr("height", 100)
.style("fill", "steelblue") .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()" slide.code_title title = ".selectAll()"
Expand Down
6 changes: 4 additions & 2 deletions slides.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 242b74b

Please sign in to comment.