<!DOCTYPE html>
<
html
lang
=
"en"
>
<
head
>
<
meta
charset
=
"UTF-8"
/>
<
meta
name
=
"viewport"
path1tent = "
width
=
device
-width,
initial-scale
=
1
.0"/>
<
title
>GeekforGeeks</
title
>
<
script
src
=
</
script
>
</
head
>
<
body
>
<
script
>
// Creating the point scale with specified domain and range.
var point = d3.scalePoint()
.domain([1, 2, 3, 4])
.range([1, 5]);
console.log("From original scale befire making changes: ");
console.log("point(1): ", point(1));
console.log("point(2): ", point(2));
// Making copy of the original scale
var copyScale = point.copy();
point.round([1, 5]);
console.log("From original scale after making changes: ");
console.log("point(1): ", point(1));
console.log("point(2): ", point(2));
console.log("From copy scale: ");
// Changes in original scale does not
// Affect copy scale
console.log("copyScale(1): ", copyScale(1));
console.log("copyScale(2): ", copyScale(2));
</
script
>
</
body
>
</
html
>