2016-08-17 17 views
6

मैं डी 3 सीख रहा हूँ और इस पाठ निम्न में से घटना "अंत" को सुन: https://www.youtube.com/watch?v=EpeOzq8eDYk&index=8&list=PL6il2r9i3BqH9PmbOf5wA5E1wOG3FT22pडी 3 एक संक्रमण

क्यों .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.

संबंधित मुद्दे