OptionalcolorAny CSS colour.
OptionaliconOptionaliconOptionalonCalled when the badge is clicked, before InterractionCallbacks.onBadgeClick.
Declaring it makes the badge take the pointer cursor and consume the click, so the node is not also selected. A badge without one stays transparent to the node underneath. Pressing a badge still drags the node either way.
OptionalpositionWhich corner to sit on. Omit it and the badge is auto-placed in the first free corner,
clockwise from 'ne'. An explicit position is honoured verbatim, even where that
overlaps another badge or the expand affordance.
OptionalsvgInline SVG markup, sanitized before it reaches the DOM.
OptionaltextA count, or one or two characters. Longer text grows the badge into a pill; past three
characters it renders as 99+. Takes precedence over any icon on the same badge.
OptionaltitleNative tooltip, rendered as a real <title>. Does not suppress the graph's own tooltip.
A small indicator pinned to a node's rim — what KeyLines and ReGraph call a glyph.
Badges are a decoration channel of their own, so a node can carry a fact that
color,shape,size,iconClassandimagePathare already spent on. They describe only the node they sit on: a collapsed cluster does not aggregate its children's badges — walknode.childrenyourself if you want that.Example