2016-08-17 3 views
6

의 이벤트 "종료"를 듣고 D3 : https://www.youtube.com/watch?v=EpeOzq8eDYk&index=8&list=PL6il2r9i3BqH9PmbOf5wA5E1wOG3FT22p나는이 교훈을 다음과 D3를 배우고 있어요 전환

.each("end", function() {...}이 오류가 생산을? 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"); }) 

답변

11

아, .each("end", function() {...}) (버전 3) 버전 .on("end", ...)로 대체 된 것으로 보인다 4.

관련 문제