Skip to content

@graphty/graphty-element / index / NodeLabelCounts

Interface: NodeLabelCounts ​

Defined in: graphty-element/src/managers/LabelDeclutter.ts:19

How many node labels the element is drawing, and why the rest are not.

A node counts once however many label lines it has. Edge labels are not counted: the element never hides an edge label to avoid overlap.

nodeHidden and hiddenByOverlap are separate parts of labeled: a label is counted under one of them at most. labeled - nodeHidden - hiddenByOverlap is the number of labels the element draws. Some of those may be outside the current view; a label outside the view is never counted as hidden. A minor release may add another hiddenBy... count for a new reason, separate from these, and the number drawn is then labeled less every hidden count.

Since ​

3.7.0

Properties ​

hiddenByOverlap ​

readonly hiddenByOverlap: number

Defined in: graphty-element/src/managers/LabelDeclutter.ts:29

Labels not drawn because, inside the current view, layoutBehavior.labels.declutter hid them: they would overlap a label it kept. Never counts a label whose node is hidden. Always 0 while declutter is off. Depends on the camera and the size of the canvas.


labeled ​

readonly labeled: number

Defined in: graphty-element/src/managers/LabelDeclutter.ts:21

Nodes whose label has text to draw.


nodeHidden ​

readonly nodeHidden: number

Defined in: graphty-element/src/managers/LabelDeclutter.ts:23

Labels not drawn because their node is not drawn (a filter or the time window hides it).