-
naruka17November 17, 2017 at 8:17 am #8096
Hello Team,
I have one requirement. I need to bind child nodes on parent node click. On page load only first level will load. when user click on any node then we will load child values from DB and bind it with particular Node. Is it possible ?
I am trying on node click event but it is not working.
Can you please help me to achieve this.my code
function onclick(d)
{
call code behind method to get child details by passing d.clientid
get data
d.values=null
d.children=null
AddIdPropertiesToChildNode(node, parented,childid)
d.values= data
d.children=data
viz.togglenode(d)
viz.update()}
vizulyNovember 17, 2017 at 8:39 am #8097Hello,
You are SO close to making this work.
If you remove the viz.toggleNode(d) I believe it should work. viz.toggleNode() basically swaps the d.children and d._children arrays. The Tree will only display d.children values. So by calling viz.toggleNode(d) you are essentially hiding the children. As toggle will either open/close a node depending on its current state.
Let me know if that works for you.
– Tom
naruka17November 20, 2017 at 5:51 am #8098Hello Tom,
now I am able to get child nodes but have below issues
1. Node/Stroke is not visible or might be colour not filled.
2. for link/stroke which connect parent and child nodes, width & colour is not as per value field. it is very thinCould you please help me to fix both issues.
Thanks
ChetanvizulyNovember 20, 2017 at 8:21 am #8099Hello Chetan,
I need a little more information. Is this just happening on the new child nodes or ALL the child nodes?
Have you read our themes and skins article that explains how to modify the appearance of the visualizations? http://vizuly.io/docs-themes-and-skins/
– Tom
-
|
You must be logged in to reply to this topic.