Show hide details below a shape nor re arraging

Dear friends,

iam creating a chart same like below image:

I want to show or hide the below table on each blue color nodes. I manage to show/hide by below code:

function showDetails(e,Obj){
diagram.model.setDataProperty(, “visible”, false);
diagram.model.setDataProperty(, “visible”, true);
reArrangeNode(“left”, leftMainNodeInc, centerObjX, centerObjY);

its working fine. But I have a function called reArrangeNode, its not working, if I call after doing some action its working pls help me . When I call re arrage function, it will calculate height of the each object and arrage accordingly. even its visible true (shows table) its calculating as old height.

pls help me to solve this… even I put diagram.updateAllTargetBinding() too its not updating…

Thanks and Regards,
Syed Abdul Rahim

Have you tried wrapping it in a transaction?

function showDetails(e, obj) {
  diagram.model.commit(m => {
    m.set(, "visible", !;
    reArrangeNode("left", leftMainNodeInc, centerObjX, centerObjY);

Dear Mr.jhardy,

Thanks for the reply. i will try this and get back to u. Pls tell me one more thing… i gave binding like

new go.Binding(“visible”, “visible”),

pls tell me how can i give this as twoway? for example locaiton i used to give like

new go.Binding(“location”, “loc”, go.Point.parse).makeTwoWay(go.Point.stringify)

for locaiton its working how can i make visible two way in order to make effect immediately?

Thanks and Regards,
Syed Abdul Rahim

You probably don’t need it to be TwoWay. A TwoWay Binding just means that when some code sets GraphObject.visible, the value is transferred to the source data object in the model.

It has nothing to do with “immediate effects”.