I've encountered an issue with my D3 code.
const hexagon = this.hexagonSVG.append('path')
.attr('id', 'active')
.attr('d', lineGenerator(<any>hexagonData))
.attr('stroke', 'url(#gradient)')
.attr('stroke-width', 3.5)
.attr('fill', 'none')
const totalLength = (<any>hexagon).node().getTotalLength()
const _transition = this.d3.transition()
.duration(DASH_ANIMATION)
.ease(this.d3.easeLinear)
hexagon
.attr('stroke-dasharray', totalLength + ' ' + totalLength)
.attr('stroke-dashoffset', totalLength)
.attr('stroke-dashoffset', 0)
.transition(_transition)
This code had been running smoothly for around 6 months, but today an unexpected error popped up.
"hexagon.attr(...).attr(...).attr(...).transition is not a function"
If anyone could provide guidance on how to resolve this issue, I would greatly appreciate it. Thank you.