I am currently working on a tree chart using d3 and this is my data,
data = {
name: 'ROOT',
id: 'root',
children: [
{
name: 'A',
id: 'A',
description: 'This is a tooltip with a long multi line text in it',
children: [
{
name: 'AA',
id: 'AA',
description: 'This is a tooltip'
},
{
name: 'BB',
id: 'BB'
}
]
},
{
name: 'B',
id: 'B',
children: [
{
name: 'AA',
id: 'AA'
},
{
name: 'BB',
id: 'BB'
},
{
name: 'CC',
id: 'CC'
}
]
}
]
};
When I pass this data to d3.hierarchy() and after consoling the result the y property is not defined. Can you explain why the y property is not calculated. Also the nodes calculated through descendants() also have the y property missing. Result after passing the data to d3.hierarchy()