Adding a secondary type of link

I have implemented the OrgChartExtras diagram on my app.

I’m trying to create the “secondary” links (orange and green) and I succesfully did it as prototype with a HTML form and a Javascript Function:
function addNewLinkType(text) {
var node = myDiagram.selection.first();

    // maxSelectionCount = 1, so there can only be one Part in this collection
    var data =;
    if (node instanceof go.Node && data !== null) {
      var model = myDiagram.model;
      model.startTransaction("modified link" );
      var type = document.getElementById("type").value;
      var who = document.getElementById("who").value;
      var text = document.getElementById("linktext").value;
      myDiagram.model.addLinkData({ from:, to: who, category: type, text: text});

      model.commitTransaction("modified link");
      //document.getElementById("mySavedModel").value = myDiagram.model.toJson();
      myDiagram.isModified = false;

But I can’t find the way how I can add Orange and green links using drag&drop.

I suspect that the problem is that your diagram has Diagram.validCycle set to some value to limit the user to only having tree-structured graphs. Such link validity checks only consider Links that are Link.isTreeLink.

The problem is that if you set the LinkingTool.archetypeLinkData to some data that specifies a link category whose corresponding link template has Link.isTreeLink set to false, the LinkingTool doesn’t realize that it would be OK to draw such a link in a non-tree relationship. That’s because LinkingTool.isValidLink doesn’t know whether any future to-be-drawn link will be Link.isTreeLink or not – it just assumed that the not-yet-created link will be isTreeLink.

We have improved the link validity checking in version 1.8.7, which is available now in beta: GoJS Change Log. Please try it and see if users can now draw non-isTreeLink links by setting LinkingTool.archetypeLinkData to specify a link template that has Link.isTreeLink set to false.

Well, I commented this line:
validCycle: go.Diagram.CycleDestinationTree

And added:
“linkingTool.archetypeLinkData”: { category: “Support” },

And seems to work perfectly.
Now, how can I make the label in the middle editable to change it once the link is done?

You can set editable: true on the TextBlock in the “Support” (and maybe “Motion”) link template.

Makes senses what you say, with the fact that I can’t link to the first node, and don’t know why?

By default, you can’t have a second link between the same pair of nodes in the same direction.

I will try thanks.

A last doubt about this chart. It’s possible to get assistants like in orgchart chart?

Sure, just incorporate the necessary pieces from the assistants sample.