D3.js为clipath形状创建轮廓 [英] D3.js create an outline to the clipath shape

查看:80
本文介绍了D3.js为clipath形状创建轮廓的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

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

I have created a foot and added color gradient as shown in the solution for the below questions. Add multi color gradient for different points in d3.js d3.js scatter plot connecting dots with line

我已经使用clipath方法来夹这只脚.现在,我想像下面的图片一样为这个脚罩设置一个黑色轮廓

I have used clipath method to clip this foot. Now I want to set a black outline to this foot mask like in the picture below

这是Stackblitz链接

推荐答案

添加:

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

scatter-plot.component.ts 的第 300 行之后= src/app/scatter-plot/scatter-plot.component.ts"rel =" nofollow noreferrer> StackBlitz

After line 300 of scatter-plot.component.ts in your StackBlitz

这篇关于D3.js为clipath形状创建轮廓的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆