<!DOCTYPE html>
<html>
<meta charset="utf-8">
<head>
<title>d3.line.defined()</title>
</head>
<script src=
</script>
<body>
<h1 style="text-align: center;
color: green;">
GeeksforGeeks
</h1>
<center>
<svg id="gfg" width="400" height="400">
</svg>
</center>
<script>
var points = [
{xpoint: 25, ypoint: 150},
{xpoint: 75, ypoint: 85},
{xpoint: 100, ypoint: 115},
{xpoint: 125, ypoint: 55},
{xpoint: 150, ypoint: 105},
{xpoint: 175, ypoint: 25},
{xpoint: 200, ypoint: 155},
{xpoint: 225, ypoint: 15},
{xpoint: 250, ypoint: 135},
];
var Gen = d3.line()
.x((p) => p.xpoint)
.y((p) => p.ypoint)
.defined(((d, i) => i != 4));
d3.select("#gfg")
.append("path")
.attr("d", Gen(points))
.attr("fill", "none")
.attr("stroke", "green");
</script>
</body>
</html>