OptionalbadgeDraw this badge as the swatch instead of a dot, for elements told apart by a
NodeStyle.badges mark rather than by their fill. It is drawn the way the canvas
draws it, so the legend shows the same mark. A badge naming no color takes the
entry's. Ignored in an edge-scoped section, whose swatch is a line.
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