dTree icon indicating copy to clipboard operation
dTree copied to clipboard

How can I decrease height of mariagge 2nd line

Open dungla2011 opened this issue 4 years ago • 3 comments

image

Thank you!

dungla2011 avatar Jan 26 '22 01:01 dungla2011

[
{
    "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
}]

y377 avatar Feb 27 '22 07:02 y377

I have not resolved it:

https://giapha.galaxycloud.vn/le-nguyen-hoang.aj861518.sdata

image

dungla2011 avatar Mar 17 '22 12:03 dungla2011

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
},

eroffa avatar Feb 11 '23 05:02 eroffa