D3.js closePath()函数
d3.closePath()函数用于关闭当前正在进行的子路径,与 SVG 的 closepath 命令几乎相同。
句法:
d3.closePath()
参数:它不接受任何参数。
返回值:不返回任何值。
示例 1:
HTML
GeeksforGeeks
D3.js | Path.closePath() Function
Note the difference between
color of both the lines
Without closePath() rest all properties
such as color, size are same
With closePath() rest all properties
such as color, size are same
HTML
GeeksforGeeks
D3.js | Path.closePath() Function
Without closePath() rest all properties
such as color, size are same
With closePath() rest all properties
such as color, size are same
输出:
示例 2:
HTML
GeeksforGeeks
D3.js | Path.closePath() Function
Without closePath() rest all properties
such as color, size are same
With closePath() rest all properties
such as color, size are same
输出: