wedges =
(pad) =>
(data) =>
{
const wedge =
(
(g) =>
({
d,
fill = "none",
opacity,
strokeColor = "black",
strokeWidth = 1,
}) =>
g
.join("path")
.attr("d", d)
.attr("fill", fill)
.attr("opacity", opacity)
.attr("stroke", strokeColor)
.attr("stroke-width", strokeWidth)
)
(
pad
.append("g")
.attr("name", "wedges")
.selectAll("path")
.data(data)
);
[
{name: "cones", d: cones, fill: color, opacity: .1},
{name: "rays" , d: rays, strokeColor: color, opacity: .3},
{name: "arcs" , d: arcs, strokeColor: color},
]
.forEach(wedge);
}