D3.js 为 clipath 形状创建轮廓

D3.js create an outline to the clipath shape

我创建了一只脚并添加了颜色渐变,如以下问题的解决方案所示。

我用clipath法夹了这只脚。现在我想给这个脚罩画一个黑色的轮廓,如下图

这是Stackblitz Link

添加:

this.svgInner
  .append("path") 
  .attr("d", line(ordered))
  .style("stroke", "black")
  .style("stroke-width", 1)
  .style("fill", "none");

在您的 StackBlitz

中的 scatter-plot.component.ts300 之后