2016-08-17 14 views
6

olay "son" dinleme D3: https://www.youtube.com/watch?v=EpeOzq8eDYk&index=8&list=PL6il2r9i3BqH9PmbOf5wA5E1wOG3FT22pBu ders şu D3 öğrenme ve olduğum bir geçiş

Neden .each("end", function() {...} bu hatayı üretiyor? Uncaught TypeError: callback.call is not a function

var canvas3 = d3.select("#doooo") 
       .append("svg") 
       .attr("width", 500) 
       .attr("height", 500) 
var circle3 = canvas3.append("circle") 
       .attr("cx", 50) 
       .attr("cy", 50) 
       .attr("r", 25) 

circle3.transition() 
    .duration(1500) 
    .attr("cx", 150) 
    .each("end", function() { console.log("This is producing an error"); }) 

cevap

11

Ah .each("end", function() {...}) (sürüm 3) sürümünde .on("end", ...) yerini almış görünüyor 4.