Show/hide in link label

hi ,
I need to hide and show the link label while clicking the button like toggle button . Any example available and clicking the node, I need whole data of that node

There are many ways to interpret what you are asking for. Could you please show some small screenshots for before and after clicking?

while clicking the button(html button) link label should visible
image

again i am clicking the same button link label should hide
image

Do you want all of the link labels to be hidden or shown at once?
If so I suggest that you have a boolean property that you set on the Model.modelData object. Call it “hiddenLabels”.

Then on the label in your Link template:

$(go.Link,
    ...,
    $(...,  // the link label
        new go.Binding("visible", "hiddenLabels", b => !b).ofModel()
        ...)
  )

Then your HTML button’s click handler can execute:

function() {
  myDiagram.model.commit(function(m) {
      m.set(m.modelData, "hiddenLabels", !m.modelData.hiddenLabels);
    })
}

Its Working.
Thanks Walter

Oops, the name of the property is the opposite of how it is used in the binding. I’ll add a converter that negates the boolean value.

I just did this

new go.Binding("visible", "hiddenLabels").ofModel(),

so that its working

Yes, it “works”, but the name of the property was the opposite of its usage, which could be misleading.

That way if you do not set the property on the Model.modelData object, the results will match the default value of true for visible on the label.

I will change it