I try to migrate an existing component from d3-transition v1.3.2 to v2.0.0 but get the following error at runtime: Error: transition 1 not found
My code is the following:
const t = transition();
const section = this.svg.selectAll('.area').data([data], (d) => {
return this.y(d.value);
});
section
.enter()
.append('path')
.merge(section)
.transition(t)
.duration(this.animationDuration)
.ease(easeLinear)
.attr('class', 'area')
.attr('d', line);
If I remove the transition, the charts are rendered correctly. I understand I should probably plug somewhere a selectAll('....') but I am unsure at which stage of the chain and what to select.
Any help would be appreciated .