Format tree data for OrgChart
masterThe tree prop expects a nested object structure where each node contains a person object and metadata about its relationship to other nodes.
Key fields per node:
id: Unique identifier for the node.person: Object containingid,avatar(URL),department,name,title, andtotalReports.hasChild: Boolean indicating if the node has children.hasParent: Boolean indicating if the node has a parent.isHighlight: Boolean for visual highlighting.children: Array of child node objects.
{
id: 1,
person: {
id: 1,
avatar: 'https://s3.amazonaws.com/uifaces/faces/twitter/spbroma/128.jpg',
department: '',
name: 'Jane Doe',
title: 'CEO',
totalReports: 5
},
hasChild: true,
hasParent: false,
isHighlight: true,
children: [
{
id: 2,
person: {
id: 2,
avatar: 'https://s3.amazonaws.com/uifaces/faces/twitter/spbroma/128.jpg',
department: '',
name: 'John Foo',
title: 'CTO',
totalReports: 0
},
hasChild: false,
hasParent: true,
isHighlight: false,
children: []
}
]
}