The d3.svg.arc()
generator assumes you are giving it a single datum
, not a list data
. It therefore assumes that each of startAngle
, endAngle
, innerRadius
, outerRadius
is either a constant or a function of the single datum
.
You cannot directly make the ends of the arc rounded over using this generator.
You could, however, draw two circles over the endpoints of the arc, using arc.centroid(startAngle)
and arc.centroid(endAngle)
as their centers and (outerRadius-innerRadius)/2
as their radius. This will give you the rounded-over appearance.
Documentation: arc.centroid