commenting pie code

master
Matt Huntington 7 years ago
parent e128d98cbd
commit 5832f13ccd

@ -59,7 +59,7 @@ path.on('click', function(clickedDatum, clickedIndex){ //set up the click handle
path.transition() //create the transition path.transition() //create the transition
.duration(750) //add how long the transition takes .duration(750) //add how long the transition takes
.attrTween('d', function(d) { //tween the d attribute .attrTween('d', function(d) { //tween the d attribute
var interpolate = d3.interpolate(this._current, d); //interpolate from what the d attribute was (this._current) and what it is now var interpolate = d3.interpolate(this._current, d); //create an interpolater function from what the d attribute was (this._current) and what it is now
this._current = interpolate(0); //save new value of data this._current = interpolate(0); //save new value of data
return function(t) { //re-run the arc function to redraw the path return function(t) { //re-run the arc function to redraw the path
return arc(interpolate(t)); return arc(interpolate(t));

Loading…
Cancel
Save