Skip to contents

Create a D3 colour scale for Sankey nodes

Usage

make_colours(id)

Arguments

id

Character vector of node identifiers, usually from nodes$id.

Value

A JavaScript expression defining a D3 ordinal scale that maps nodes to pastel colours.