Adding text and link on node

Hi All,

Is it possible to add text and link both on single node?

For Example : image

on click of link we will show pop up and do our functionalities on that node.

Sure. You probably want to use the HypelinkText extensions demonstrated here: Demo of HyperlinkText Builder

Thanks for the reply jhardy,

we are using Demo of HyperlinkText Builder

but it will give complete node text as a link.

our requirement is two show text + link as shown in the diagram above.

Information is text and link1, link2 are two diff href.

is it possible to use go.textblock and go.(“hyperlinkText”,{}) at a time on single node?

can you share any samples on this?

Yes, just design your node template as such. You should start by reading the learn page and some of the intro pages.

Thanks jhardy,

we will explore more and try the possibilities of designing node as per our requirement.

Hi,

I have done like below for text and hyperlink on single node but it seems it is overlapping.

do we have any option to avoid overlapping text and hyperlink?

myDiagram.nodeTemplate =
(go.Node, "Vertical", { selectionObjectName: "MAIN" }, (go.Panel, “Auto”,
(go.Shape, "RoundedRectangle", { fill: null }), (go.TextBlock, “Node 1 Info”, { margin: 5 }),
$(“HyperlinkText”,
function(node) { return “Create”; }
)
)
));

image

Put the TextBlock and HyperlinkText within a horizontal panel.

$(go.Node, "Auto",
  $(go.Shape, "RoundedRectangle",
    ...
  ),
  $(go.Panel, "Horizontal",
    $(go.TextBlock,
      ...
    ),
    $("HyperlinkText",
      ...
    )
);

https://gojs.net/latest/intro/buildingObjects.html
https://gojs.net/latest/intro/panels.html