SankeyDiagramLinkColorScheme

New in version 5.0.10

SankeyDiagramLinkColorScheme ( colorScheme ;​ opacity )

Argument Type Range Default Note
colorScheme int 1..3 1
opacity num 0..1 0.4
Description

The appearance of the links can be controlled by using the functions SankeyDiagramLinkColorScheme() and SankeyDiagramLinkStyle() . By using the SankeyDiagramLinkColorScheme() function, 3 special color schemes can be applied to links. If argument colorScheme is not defined, color scheme 1 is used by default. The transparency of the colors can be controlled by using the 2nd argument opacity. The opacity can be set between 0 (fully transparent) and 1 (completely opaque) — default is 0.4.

colorScheme =​ 1: Apply the fill color of the source nodes to the links (default), for example:

colorScheme =​ 2: Apply the fill color of the target nodes to the links, for example:

colorScheme =​ 3: Apply the color gradient between source and target node colors to the links, for example:

Function SankeyDiagramLinkColorScheme() can be customized by using the corresponding SankeyDiagramLinkStyle() function. The color scheme function should be listed before the style function(s).

Please note that SankeyDiagramLinkColorScheme() should be listed after function SankeyDiagram() . This rule generally applies: Function SankeyDiagram() should always be listed first before other Sankey functions are called.

Scroll to Top