ApexTree — Count Badges

An always-visible pill in the top-right corner of every node showing a number — a descendant count, a direct-child count, or any per-node metric you supply. Enable with countBadgeEnabled: true and pick the number via countBadgeSource.

countBadgeSource: 'children'

Each department shows how many direct children it has. Root and leaves show none.

countBadgeSource: 'descendants' (default)

Every node shows its total descendant count across all levels.

countBadgeSource: 'data' (head-count)

Reads a per-node count field — any metric, not a structural count.

Custom colors + threshold: 2

Emerald badge; hidden on nodes with fewer than 2 descendants.

RTL — Arabic (locale.direction: 'rtl')

Arabic labels with locale.direction: 'rtl'. The tree mirrors right-to-left and each badge moves to the node's top-left corner.