The swatch colour — any CSS colour. Sampled from the renderer in derived mode:
the node's fill, or an edge's stroke in an edge-scoped section.
Stable identity: the toggle key, and the value written to the filter.
OptionallabelHuman label, used verbatim (so it can be translated).
OptionalorderDisplay order, ascending.
OptionalpredicateWhich elements this entry stands for. Defaults to matching id against
LegendOptions.key on the element's data, when a key is declared.
Receives a Node, or an Edge when the section declares scope: 'edge'.
One row in the legend: a swatch, a label, and how to tell which elements it stands for — nodes, or edges in an
edge-scoped section.Example