I have been working on collapsible tree in which a large set of data overlapping occurs and the whole tree looks clumsy. What I am trying to do is to open a data-table and expand only selected nodes from the data-table something like this, on selecting MN type node, a data-table opens here and on selecting any of up to 5 nodes using checkbox,all the 5 nodes shall be expanded to that parent MN node like this but it does not expand here.
This is what I have tried so far
var selected; //select node to which data shall be expanded
var selectedMnDataArray =[]; //collecting data from data-table
selectedMnDataArray.parent = selected;
if(!selected.children){
selected.children = [];
selected.treeData5.children = [];
}
selected.children.push(selectedMnDataArray);
selected.treeData5.children.push(selectedMnDataArray.data);
update(selected);
But this only expands a link as you can see in the picture.
Another thing I tried is from the post d3.js how to dynamically add nodes to a tree
But this also doesn't work in my case.
please anyone help me out here.