HyperLink for Item within Node - EntityRelationship

I am trying to add a URL for every item in the example - Entity Relationship

The aim is to click an item, such as ProductID under Products, and open a new page, based on the URL.

I tried to update the TextBlock with a click function -

              stroke: "#333333",
              font: "bold 14px sans-serif",
              wrap: go.TextBlock.WrapFit,
              editable: false,
              click: function(e, obj) {
                var itemData = obj.part.data;
                window.open(itemData.url, "_blank");

However, it always opens a blank page. I feel I am missing something in referring to the URL in the item, and end up referring to the url in the node itself.

I have updated the nodeDataArray as -

var nodeDataArray = [
          key: "Products",
          items: [{ name: "ProductID", iskey: true, figure: "Decision", color: colors.red, url: "https://www.example.com/product"},
          { name: "ProductName", iskey: false, figure: "Hexagon", color: colors.blue url: "https://www.example.com/productname"},
          { name: "SupplierID", iskey: false, figure: "Decision", color: "purple" , url: "https://www.example.com/supplierID"},
          { name: "CategoryID", iskey: false, figure: "Decision", color: "purple" , url: "https://www.example.com/categoryID"}]
        }, ...

That’s the right idea. I assume you have checked that the value of itemData.url is what you are expecting. And I assume you have a Binding on the TextBlock.text property so that it shows whatever text you would like to show.

There’s a pre-defined “HyperlinkText” builder in extensions/HyperlinkText.js.