radial gradients for multiple arcs in d3
问题 I have the following arc diagram: I would like to add a gradient to each of the individual arcs, that flows from the outer radius to the inner radius of each individual arc. I am guessing that I will need to create an individual gradient for each arc? let radius = 100; for(let i = 0; i < 5; i ++) { let grad = defs.append('radialGradient') .attr('id', 'mygrad' + i) .attr('gradientUnits', 'userSpaceOnUse') .attr('cx', '0') .attr('cy', '0') .attr('r', radius) grad.append('stop') .attr('offset',