UNPKG
d3-sankey
Version:
latest (0.12.3)
0.12.3
0.12.2
0.12.1
0.12.0
0.11.0
0.10.4
0.10.3
0.10.2
0.10.1
0.10.0
0.9.1
0.9.0
0.8.1
0.8.0
0.7.1
0.7.0
0.6.1
0.6.0
0.5.0
0.4.2
0.4.1
0.4.0
0.3.4
0.3.3
0.3.2
0.3.1
0.3.0
0.2.1
0.2.0
0.1.3
0.1.2
0.1.1
0.1.0
Visualize flow between nodes in a directed acyclic network.
github.com/d3/d3-sankey
d3/d3-sankey
d3-sankey
/
src
/
sankeyLinkHorizontal.js
16 lines
(12 loc)
•
291 B
JavaScript
View Raw
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
import
{linkHorizontal}
from
"d3-shape"
;
function
horizontalSource
(
d
) {
return
[d.
source
.
x1
, d.
y0
]; }
function
horizontalTarget
(
d
) {
return
[d.
target
.
x0
, d.
y1
]; }
export
default
function
(
) {
return
linkHorizontal
() .
source
(horizontalSource) .
target
(horizontalTarget); }