Make entire D3.Selection generic

This commit is contained in:
Anatoly Bakirov
2015-03-31 15:05:18 -07:00
parent 016a970de5
commit 0858c16a2c
2 changed files with 61 additions and 60 deletions
+3 -3
View File
@@ -476,7 +476,7 @@ function callenderView() {
.style("text-anchor", "middle")
.text(function (d) { return d; });
var rect = svg.selectAll(".day")
var rect: D3.UpdateSelection = svg.selectAll(".day")
.data(function (d) { return d3.time.days(new Date(d, 0, 1), new Date(d + 1, 0, 1)); })
.enter().append("rect")
.attr("class", "day")
@@ -960,7 +960,7 @@ function forcedBasedLabelPlacemant() {
var anchorLink = vis.selectAll("line.anchorLink").data(labelAnchorLinks)//.enter().append("svg:line").attr("class", "anchorLink").style("stroke", "#999");
var anchorNode = vis.selectAll("g.anchorNode").data(force2.nodes()).enter().append("svg:g").attr("class", "anchorNode");
var anchorNode: D3.Selection = vis.selectAll("g.anchorNode").data(force2.nodes()).enter().append("svg:g").attr("class", "anchorNode");
anchorNode.append("svg:circle").attr("r", 0).style("fill", "#FFF");
anchorNode.append("svg:text").text(function (d, i) {
return i % 2 == 0 ? "" : d.node.label
@@ -1404,7 +1404,7 @@ function quadtree() {
.attr("width", function (d) { return d.width; } )
.attr("height", function (d) { return d.height; } );
var point = svg.selectAll(".point")
var point: D3.Selection = svg.selectAll(".point")
.data(data)
.enter().append("circle")
.attr("class", "point")