UNPKG
d3-hierarchy
Version:
latest (3.1.2)
next (2.0.0-rc.4)
3.1.2
3.1.1
3.1.0
3.0.1
3.0.0
2.0.0
2.0.0-rc.4
2.0.0-rc.3
2.0.0-rc.2
2.0.0-rc.1
1.1.9
1.1.8
1.1.7
1.1.6
1.1.5
1.1.4
1.1.3
1.1.2
1.1.1
1.1.0
1.0.4
1.0.3
1.0.2
1.0.1
1.0.0
0.3.0
0.2.4
0.2.3
0.2.2
0.2.1
0.2.0
0.1.0
0.0.2
0.0.1
Layout algorithms for visualizing hierarchical data.
d3js.org/d3-hierarchy/
d3/d3-hierarchy
d3-hierarchy
/
src
/
treemap
/
round.js
7 lines
(6 loc)
•
166 B
JavaScript
View Raw
1
2
3
4
5
6
7
export
default
function
(
node
) { node.
x0
=
Math
.
round
(node.
x0
); node.
y0
=
Math
.
round
(node.
y0
); node.
x1
=
Math
.
round
(node.
x1
); node.
y1
=
Math
.
round
(node.
y1
); }