I have been trying to understand how the distance between nodes is calculated. In my case, the distance is very large and I would like to move the nodes closer together. I looked at nodeSpacing and linkSpacing but they do not seem to have any impact on the layout.
I have included my node and link data below.
var exampleNodes = [
// Ingestion Zone
{"type":"Ingest","id":"in","parent":null,"name":"Ingestion"},
{"type":"Ingest","id":2,"parent":"in","name":"Product A"},
{"type":"Ingest","id":3,"parent":"in","name":"Product B"},
{"type":"Ingest","id":4,"parent":"in","name":"Product C"},
{"type":"Ingest","id":5,"parent":"in","name":"Product D"},
// Collocation Zone
{"type":"Collocation","id":"cl","parent":null,"name":"Collocation"},
// Unity Collocation phase 1
{"type":"Collocation","id":"cl1","parent":"cl","name":"Collocation1"},
{"type":"Collocation","id":"cl1mr4","parent":"cl1","name":"MR4"},
{"type":"Collocation","id":"cl1kh","parent":"cl1","name":"KH-KHp"},
{"type":"Collocation","id":8,"parent":"cl1mr4","name":"MR4-XML"},
{"type":"Collocation","id":9,"parent":"cl1kh","name":"KH-System"},
{"type":"Collocation","id":10,"parent":"cl1kh","name":"KH-DiskDpe"},
{"type":"Collocation","id":11,"parent":"cl1kh","name":"KH-DiskDae"},
{"type":"Collocation","id":12,"parent":"cl1kh","name":"KH-Dpe"},
{"type":"Collocation","id":13,"parent":"cl1kh","name":"KH-Dae"},
{"type":"Collocation","id":14,"parent":"cl1kh","name":"KH-Pool"},
{"type":"Collocation","id":15,"parent":"cl1kh","name":"KH-Software"},
// Unity Collocation phase 2
{"type":"Collocation","id":"cl2","parent":"cl","name":"Collocation2"},
{"type":"Collocation","id":"cl2mr4","parent":"cl2","name":"MR4"},
{"type":"Collocation","id":"cl2kh","parent":"cl2","name":"KH"},
{"type":"Collocation","id":"cl2khp","parent":"cl2","name":"KHplus"},
{"type":"Collocation","id":35,"parent":"cl2mr4","name":"MR4-XML"},
{"type":"Collocation","id":21,"parent":"cl2kh","name":"KH-System"},
{"type":"Collocation","id":22,"parent":"cl2kh","name":"KH-DiskDpe"},
{"type":"Collocation","id":23,"parent":"cl2kh","name":"KH-DiskDae"},
{"type":"Collocation","id":24,"parent":"cl2kh","name":"KH-Dpe"},
{"type":"Collocation","id":25,"parent":"cl2kh","name":"KH-Dae"},
{"type":"Collocation","id":26,"parent":"cl2kh","name":"KH-Pool"},
{"type":"Collocation","id":27,"parent":"cl2khp","name":"KH-Software"},
{"type":"Collocation","id":28,"parent":"cl2khp","name":"KHp-System"},
{"type":"Collocation","id":29,"parent":"cl2khp","name":"KHp-DiskDpe"},
{"type":"Collocation","id":30,"parent":"cl2khp","name":"KHp-DiskDae"},
{"type":"Collocation","id":31,"parent":"cl2khp","name":"KHp-Dpe"},
{"type":"Collocation","id":32,"parent":"cl2khp","name":"KHp-Dae"},
{"type":"Collocation","id":33,"parent":"cl2khp","name":"KHp-Pool"},
{"type":"Collocation","id":34,"parent":"cl2khp","name":"KHp-Software"},
// Data transformation
{"type":"Transform","id":"tr","parent":null,"name":"Transform"},
{"type":"Transform","id":36,"parent":"tr","name":"MR4-Software"},
{"type":"Transform","id":37,"parent":"tr","name":"MR4-Disks"},
{"type":"Transform","id":38,"parent":"tr","name":"MR4-GlobalPools"},
// Data Zone
{"type":"DataProcess","id":"dp","parent":null,"name":"DataProcessing"},
// Extract
{"type":"DataProcess","id":"ex","parent":"dp","name":"Extract"},
{"type":"DataProcess","id":"exmr4","parent":"ex","name":"MR4"},
{"type":"DataProcess","id":"exkh","parent":"ex","name":"KH"},
{"type":"DataProcess","id":"exkhp","parent":"ex","name":"KHplus"},
{"type":"DataProcess","id":40,"parent":"exmr4","name":"MR4-Software"},
{"type":"DataProcess","id":41,"parent":"exmr4","name":"MR4-Disks"},
{"type":"DataProcess","id":42,"parent":"exmr4","name":"MR4-GlobalPools"},
{"type":"DataProcess","id":43,"parent":"exkh","name":"KH-System"},
{"type":"DataProcess","id":44,"parent":"exkh","name":"KH-DiskDpe"},
{"type":"DataProcess","id":45,"parent":"exkh","name":"KH-DiskDae"},
{"type":"DataProcess","id":46,"parent":"exkh","name":"KH-Dpe"},
{"type":"DataProcess","id":47,"parent":"exkh","name":"KH-Dae"},
{"type":"DataProcess","id":48,"parent":"exkh","name":"KH-Pool"},
{"type":"DataProcess","id":49,"parent":"exkhp","name":"KH-Software"},
{"type":"DataProcess","id":50,"parent":"exkhp","name":"KHp-System"},
{"type":"DataProcess","id":51,"parent":"exkhp","name":"KHp-DiskDpe"},
{"type":"DataProcess","id":52,"parent":"exkhp","name":"KHp-DiskDae"},
{"type":"DataProcess","id":53,"parent":"exkhp","name":"KHp-Dpe"},
{"type":"DataProcess","id":54,"parent":"exkhp","name":"KHp-Dae"},
{"type":"DataProcess","id":55,"parent":"exkhp","name":"KHp-Pool"},
{"type":"DataProcess","id":56,"parent":"exkhp","name":"KHp-Software"},
// Clean
{"type":"DataProcess","id":"cln","parent":"dp","name":"Clean"},
{"type":"DataProcess","id":"clnmr4","parent":"cln","name":"MR4"},
{"type":"DataProcess","id":"clnkh","parent":"cln","name":"KH"},
{"type":"DataProcess","id":"clnkhp","parent":"cln","name":"KHplus"},
{"type":"DataProcess","id":60,"parent":"clnmr4","name":"MR4-Software"},
{"type":"DataProcess","id":61,"parent":"clnmr4","name":"MR4-Disks"},
{"type":"DataProcess","id":62,"parent":"clnmr4","name":"MR4-GlobalPools"},
{"type":"DataProcess","id":63,"parent":"clnkh","name":"KH-System"},
{"type":"DataProcess","id":64,"parent":"clnkh","name":"KH-DiskDpe"},
{"type":"DataProcess","id":65,"parent":"clnkh","name":"KH-DiskDae"},
{"type":"DataProcess","id":66,"parent":"clnkh","name":"KH-Dpe"},
{"type":"DataProcess","id":67,"parent":"clnkh","name":"KH-Dae"},
{"type":"DataProcess","id":68,"parent":"clnkh","name":"KH-Pool"},
{"type":"DataProcess","id":69,"parent":"clnkhp","name":"KH-Software"},
{"type":"DataProcess","id":70,"parent":"clnkhp","name":"KHp-System"},
{"type":"DataProcess","id":71,"parent":"clnkhp","name":"KHp-DiskDpe"},
{"type":"DataProcess","id":72,"parent":"clnkhp","name":"KHp-DiskDae"},
{"type":"DataProcess","id":73,"parent":"clnkhp","name":"KHp-Dpe"},
{"type":"DataProcess","id":74,"parent":"clnkhp","name":"KHp-Dae"},
{"type":"DataProcess","id":75,"parent":"clnkhp","name":"KHp-Pool"},
{"type":"DataProcess","id":76,"parent":"clnkhp","name":"KHp-Software"},
// Align
{"type":"DataProcess","id":"al","parent":"dp","name":"Align"},
{"type":"DataProcess","id":77,"parent":"al","name":"System"},
{"type":"DataProcess","id":78,"parent":"al","name":"Disk"},
{"type":"DataProcess","id":79,"parent":"al","name":"Pool"},
// Analyze
{"type":"Analytics","id":"an","parent":null,"name":"Analytics"},
{"type":"Analytics","id":80,"parent":"an","name":"ManagedSystems"},
{"type":"Analytics","id":81,"parent":"an","name":"ManagedSystemDetails"},
{"type":"Analytics","id":82,"parent":"an","name":"SystemCap"},
{"type":"Analytics","id":83,"parent":"an","name":"SystemCapTier"},
// Insert
{"type":"Insert","id":"is","parent":null,"name":"Insert"},
{"type":"Insert","id":90,"parent":"is","name":"ManagedSystems"},
{"type":"Insert","id":91,"parent":"is","name":"ManagedSystemDetails"},
{"type":"Insert","id":92,"parent":"is","name":"SystemCap"},
{"type":"Insert","id":93,"parent":"is","name":"SystemCapTier"},
]
var exampleLinks = [
// Ingestion to Collocation
{"source":3,"target":8,"value":1},
{"source":3,"target":9,"value":1},
{"source":3,"target":10,"value":1},
{"source":3,"target":11,"value":1},
{"source":3,"target":12,"value":1},
{"source":3,"target":13,"value":1},
{"source":3,"target":14,"value":1},
{"source":3,"target":15,"value":1},
{"source":9,"target":21,"value":1},
{"source":10,"target":22,"value":1},
{"source":11,"target":23,"value":1},
{"source":12,"target":24,"value":1},
{"source":13,"target":25,"value":1},
{"source":14,"target":26,"value":1},
{"source":15,"target":27,"value":1},
{"source":9,"target":28,"value":1},
{"source":10,"target":29,"value":1},
{"source":11,"target":30,"value":1},
{"source":12,"target":31,"value":1},
{"source":13,"target":32,"value":1},
{"source":14,"target":33,"value":1},
{"source":15,"target":34,"value":1},
// Phase 2
{"source":8,"target":35,"value":1},
// MR4 Transforation
{"source":35,"target":36,"value":1},
{"source":35,"target":37,"value":1},
{"source":35,"target":38,"value":1},
// Extract
{"source":36,"target":40,"value":1},
{"source":37,"target":41,"value":1},
{"source":38,"target":42,"value":1},
{"source":21,"target":43,"value":1},
{"source":22,"target":44,"value":1},
{"source":23,"target":45,"value":1},
{"source":24,"target":46,"value":1},
{"source":25,"target":47,"value":1},
{"source":26,"target":48,"value":1},
{"source":27,"target":49,"value":1},
{"source":28,"target":50,"value":1},
{"source":29,"target":51,"value":1},
{"source":30,"target":52,"value":1},
{"source":31,"target":53,"value":1},
{"source":32,"target":54,"value":1},
{"source":33,"target":55,"value":1},
{"source":34,"target":56,"value":1},
// Clean and Interpret
{"source":40,"target":60,"value":1},
{"source":41,"target":61,"value":1},
{"source":42,"target":62,"value":1},
{"source":43,"target":63,"value":1},
{"source":44,"target":64,"value":1},
{"source":45,"target":65,"value":1},
{"source":46,"target":66,"value":1},
{"source":47,"target":67,"value":1},
{"source":48,"target":68,"value":1},
{"source":49,"target":69,"value":1},
{"source":50,"target":70,"value":1},
{"source":51,"target":71,"value":1},
{"source":52,"target":72,"value":1},
{"source":53,"target":73,"value":1},
{"source":54,"target":74,"value":1},
{"source":55,"target":75,"value":1},
{"source":56,"target":76,"value":1},
// Align
{"source":60,"target":77,"value":1},
{"source":61,"target":78,"value":1},
{"source":62,"target":79,"value":1},
{"source":63,"target":77,"value":1},
{"source":64,"target":78,"value":1},
{"source":65,"target":78,"value":1},
{"source":66,"target":78,"value":1},
{"source":67,"target":78,"value":1},
{"source":68,"target":79,"value":1},
{"source":69,"target":77,"value":1},
{"source":70,"target":78,"value":1},
{"source":71,"target":78,"value":1},
{"source":72,"target":78,"value":1},
{"source":73,"target":78,"value":1},
{"source":74,"target":78,"value":1},
{"source":75,"target":79,"value":1},
{"source":76,"target":77,"value":1},
// Analyze
{"source":77,"target":80,"value":1},
{"source":77,"target":81,"value":1},
{"source":78,"target":82,"value":1},
{"source":78,"target":83,"value":1},
{"source":79,"target":82,"value":1},
{"source":79,"target":83,"value":1},
// Insert
{"source":80,"target":90,"value":1},
{"source":81,"target":91,"value":1},
{"source":82,"target":92,"value":1},
{"source":83,"target":93,"value":1},
]