Skip to content

Instantly share code, notes, and snippets.

@PirosB3
Created February 5, 2014 01:04
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save PirosB3/8815613 to your computer and use it in GitHub Desktop.
Save PirosB3/8815613 to your computer and use it in GitHub Desktop.
var g = this.svg
.selectAll('.arc path')
.data(pie(mappedData), function(e) {
return e.data.label;
})
g.enter()
.append('g')
.attr('class', 'arc')
.append('path')
g.transition()
.attr("d", function(a) {
var res = arc(a);
console.log(res);
return res;
})
.style("fill", _.bind(function(d) {
return this.COLORS[d.data.label];
}, this));
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment