OrganizationChart
NewMake reporting lines, teams and hierarchical relationships easy to explore.
Meet the team
Choose a person or department. Use the round controls to collapse a branch, and scroll horizontally to explore a wider chart.
Select a person or a team to inspect the organization.
Selected keys: none
Simple hierarchy
Labels work without templates. Set collapsible to false to keep all branches visible.
Node templates
Import AvOrganizationChart and AvOrganizationChartNodeTemplate from avero-ui. Match a template's type to node.type; omitted type is the default fallback. Each template receives the node, level, expanded and selected.
<av-organization-chart inputId="team" label="Our team" [value]="nodes"
selectionMode="multiple" [(selection)]="selectedKeys" [(expandedKeys)]="expandedKeys"
(onNodeSelect)="onSelect($event.node)">
<ng-template [avOrganizationChartNode]="nodes" type="person" let-node>
<strong>{{ node.label }}</strong>
<span>{{ node.data?.title }}</span>
</ng-template>
<ng-template [avOrganizationChartNode]="nodes" let-node>
{{ node.label }}
</ng-template>
</av-organization-chart>Usage and API
value accepts AvOrganizationChartNode<T>[]. Each node requires a globally unique key and label. Optional fields: data, children, type, expanded, leaf, disabled, selectable, styleClass and style. Existing AvTreeNode arrays also work. inputId must be unique on the page.