# GoJS in 12 Minutes Video Code

Link to video here.

    const $ = go.GraphObject.make;

    const myDiagram = new go.Diagram("myDiagramDiv");
    const nodeDataArray = [
        { key: "Alpha", color: "lime" },
        { key: "Beta", color: "cyan" },
        { key: "Zeta", isGroup: true },
        { key: "Delta", color: "pink", group: "Zeta" },
        { key: "Gamma", color: "maroon", group: "Zeta" }
      ];
    const linkDataArray = [
        { to: "Beta", from: "Alpha", color: "red" },
        { to: "Zeta", from: "Alpha" }
      ];
    myDiagram.model = new go.GraphLinksModel(nodeDataArray, linkDataArray);

    myDiagram.nodeTemplate =
      $(go.Node, "Auto",
        $(go.Shape, "RoundedRectangle", { fill: "white", },
            new go.Binding("fill", "color")
        ),
        $(go.TextBlock, "text", { margin: 10 },
            new go.Binding("text", "key")
        )
      );

    myDiagram.linkTemplate =
      $(go.Link,
        $(go.Shape, { strokeWidth: 3 },
            new go.Binding("stroke", "color")),
        $(go.Shape,
        { toArrow: "Standard", stroke: null },
            new go.Binding("fill", "color"))
      );