Skip to content

Instantly share code, notes, and snippets.

@ESeufert
Created May 2, 2014 09:14
Show Gist options
  • Save ESeufert/7d67928a61cbf5729df9 to your computer and use it in GitHub Desktop.
Save ESeufert/7d67928a61cbf5729df9 to your computer and use it in GitHub Desktop.
var dataCirclesGroup = vis.append('svg:g');
var circles = dataCirclesGroup
.selectAll('.data-point')
.data(data);
circles
.enter()
.append('svg:circle')
.attr('class', 'dot')
.attr('fill', function() { return "red"; })
.attr('cx', function(d) { return x(d["date"]); })
.attr('cy', function(d) { return y(d["DAU"]); })
.attr('r', function() { return 3; })
.on("mouseover", function(d) {
d3.select(this)
.attr("r", 8)
.attr("class", "dot-selected")
.transition()
.duration(750);
})
.on("mouseout", function(d) {
d3.select(this)
.attr("r", 3)
.attr("class", "dot")
.transition()
.duration(750);
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment