Open dungla2011 opened 2 years ago
[
{
"name": "Father", // The name of the node
"class": "node", // The CSS class of the node
"textClass": "nodeText", // The CSS class of the text in the node
"depthOffset": 1, // Generational height offset
"marriages": [
{ // Marriages is a list of nodes
"spouse":
{ // Each marriage has one spouse
"name": "Mother",
},
"children": [
{ // List of children nodes
"name": "Child",
}]
}],
"extra":
{} // Custom data passed to renderers
}]
I have not resolved it:
https://giapha.galaxycloud.vn/le-nguyen-hoang.aj861518.sdata
Try playing with these functions:
nodeHeightSeperation: function(nodeWidth, nodeMaxHeight) {
return nodeMaxHeight * 1.5; // nodeMaxHeight * 2 and so on
},
And
nodeSize: function(nodes, width, textRenderer) {
_.map(nodes, function (n) {
n.cWidth = 150; // 300 and so on
n.cHeight = 150; // 300 and so on
});
return [250, 250]; // 500, 500 and so on
},
Thank you!