<!DOCTYPE html>
<
html
lang
=
"en"
>
<
head
>
<
meta
charset
=
"UTF-8"
/>
<
meta
name
=
"viewport"
path1tent
=
"width=device-width, initial-scale=1.0"
/>
</
script
>
</
head
>
<
body
>
<
h2
style
=
"color:green"
>GeekforGeeks</
h2
>
<
h3
>quantile.range() Function</
h3
>
<
script
>
var quantile = d3.scaleQuantile()
// Setting domain for the scale.
.domain([10, 20, 30, 40])
// Discrete range
.range([6, 12, 18, 24]);
// Printing the output
document.write("<
span
>quantile(10): "
+ quantile(10) + "</
span
><
br
>");
document.write("<
span
>quantile(20): "
+ quantile(20) + "</
span
><
br
>");
document.write("<
span
>quantile(30): "
+ quantile(30) + "</
span
><
br
>");
document.write("<
span
>quantile(40): "
+ quantile(40) + "</
span
><
br
>");
</
script
>
</
body
>
</
html
>