even if all the values are right before it reaches to the drawing part, the code below keeps returrning error message
Expected number, "MNaN,NaNLNaN,NaNL…".
my lineRadial function is as below.
var radarLine = d3.lineRadial()
.radius(function(d) {
return rscale(d.value)
})
.angle(function(i) { return i * angleSlice })
And i called this function to draw radial chart like below.
var blobWrapper = g.selectAll(".radarWrapper")
.data(data)
.join('g')
.attr("class", "radarWrapper")
blobWrapper.append('path')
.attr('class', 'radarArea')
.attr('d', function(d) { return radarLine(d); })
.style('fill', function(d, i) { return cfg.color[i] })
.style('fill-opacity', cfg.opacityArea)
I fixed this error by putting one dummy parameter in the line function.
var radarLine = d3.radialLine()
.radius(function(d) {
return rscale(d.value)
})
.angle(function(d, i) { return i * angleSlice })
just by adding 'd' parameter to the angle function, it started working. why is it?