<!DOCTYPE html>
<
html
>
<
meta
charset
=
"utf-8"
>
<
head
>
<
script
src
=
</
script
>
</
head
>
<
body
>
<
h1
style
=
"text-align:center; color:green;"
>
GeeksforGeeks
</
h1
>
<
center
>
<
svg
id
=
"gfg"
width
=
"200"
height
=
"200"
></
svg
>
</
center
>
<
script
>
var points = [
{ xpoint: 25, ypoint: 150 },
{ xpoint: 75, ypoint: 85 },
{ xpoint: 100, ypoint: 115 },
{ xpoint: 175, ypoint: 25 },
{ xpoint: 200, ypoint: 150 }];
var Gen = d3.line()
.x((p) => p.xpoint)
.y((p) => p.ypoint)
.curve(d3.curveBundle.beta(.25));
var Gen1 = d3.line()
.x((p) => p.xpoint)
.y((p) => p.ypoint)
.curve(d3.curveBundle.beta(.5));
var Gen2 = d3.line()
.x((p) => p.xpoint)
.y((p) => p.ypoint)
.curve(d3.curveBundle.beta(.75));
var Gen3 = d3.line()
.x((p) => p.xpoint)
.y((p) => p.ypoint)
.curve(d3.curveBundle.beta(1));
d3.select("#gfg")
.append("path")
.attr("d", Gen(points))
.attr("fill", "none")
.attr("stroke", "green");
d3.select("#gfg")
.append("path")
.attr("d", Gen1(points))
.attr("fill", "none")
.attr("stroke", "green");
d3.select("#gfg")
.append("path")
.attr("d", Gen2(points))
.attr("fill", "none")
.attr("stroke", "green");
d3.select("#gfg")
.append("path")
.attr("d", Gen3(points))
.attr("fill", "none")
.attr("stroke", "green");
</
script
>
</
body
>
</
html
>