<!DOCTYPE html>
<
html
lang
=
"en"
>
<
head
>
<
meta
charset
=
"UTF-8"
/>
<
meta
name
=
"viewport"
path1tent = "
width
=
device
-width,
initial-scale
=
1
.0"/>
<
script
src
=
</
script
>
</
head
>
<
body
>
<
script
>
// Creating the band scale with
// specified domain and range.
var band = d3.scaleBand()
.domain([10, 20, 30, 40, 50])
.range([0, 1]);
console.log("Without rangeRound function:");
console.log("band(10): ", band(10));
console.log("band(20): ", band(20));
console.log("With rangeRound function:");
var band = d3.scaleBand()
.domain([10, 20, 30, 40, 50])
.rangeRound([0, 1]);
console.log("band(10): ", band(10));
console.log("band(20): ", band(20));
</
script
>
</
body
>
</
html
>