-1
私はd3.js v3の - アニメーションとtextcontext
- をV4するV3からチャートアプリケーションをリファクタリングしています "例外TypeError:callback.callは関数ではありません"
はこちらコード - しかし、なぜこれがcallback.callエラーを引き起こしているのかわかりません?
waveGroup.attr('transform','translate('+waveGroupXPosition+','+waveRiseScale(0)+')')
私はこのanimateWaveコード
// Data for building the clip wave area.
var data = [];
for(var i = 0; i <= 40*waveClipCount; i++){
data.push({x: i/(40*waveClipCount), y: (i/(40))});
}
var clipArea = d3.area()
var wave = waveGroup.append("path")
.datum(data)
.attr("d", clipArea)
.attr("T", 0);
function animateWave() {
wave.attr('transform','translate('+waveAnimateScale(wave.attr('T'))+',0)');
wave.transition()
.duration(config.waveAnimateTime * (1-wave.attr('T')))
.ease('linear')
.attr('transform','translate('+waveAnimateScale(1)+',0)')
.attr('T', 1)
.each('end', function(){
wave.attr('T', 0);
animateWave(config.waveAnimateTime);
});
}
でその問題を信じて、私はそれをリファクタリングする必要があると思う - ので、その多くのこのような
function repeat() {
timeCircle
.attr('cx', 210) // position the circle at 40 on the x axis
.attr('cy', (yPos*45)+25) // position the circle at 250 on the y axis
.transition() // apply a transition
.ease(easement) // control the speed of the transition
.duration(4000) // apply it over 2000 milliseconds
.attr('cx', 720) // move the circle to 920 on the x axis
.transition() // apply a transition
.ease(easement) // control the speed of the transition
.duration(4000) // apply it over 2000 milliseconds
.attr('cx', 210) // return the circle to 40 on the x axis
.on("end", repeat); // when the transition finishes start again
};
https://bl.ocks.org/d3noob/1ea51d03775b9650e8dfd03474e202fe イージー機能が変更されましたか?