How to create the group that contains different types of nodes?


I’m beginner in GoJS and trying to do some testing because my company seriously is thinking to buy it.

For example, I want to create the group with fixed border that contains 2 different types of nodes: simple rounded rectangle with text and table with rows and columns?

I’d like to fill both nodes with their own nodeDataArray objects, which data I’m getting from jQuery Ajax calls. The Ajax calls trigger actions in standard MVC application.

Should I do that in this way or it’s working in another way in GoJS?

If you have some code samples it could be very welcome.

Have you read about using node template maps? GoJS Template Maps -- Northwoods Software

You could create different node templates for your various node types, and set the category within your model data. We have lots of examples of using multiple node templates; searching those will probably help you figure out what you how to implement what you want.

Thank you, but I haven’t found what I’m looking for.

Here’s my code:

function initComplexObject() {
    var $ = go.GraphObject.make;

    var diagram =
      $(go.Diagram, "myDiagramDiv",
            initialContentAlignment: go.Spot.Center,
            "undoManager.isEnabled": true

    var violetbrush = $(go.Brush, "Linear", { 0.0: "Violet", 1.0: "Lavender" });

      $(go.Node, "Auto",
        $(go.Shape, "RoundedRectangle",
          { fill: violetbrush }),
        $(go.TextBlock, "Hello!",
          { margin: 5 })

      $(go.Node, "Auto",
        $(go.Shape, "Ellipse",
          { fill: violetbrush }),
        $(go.TextBlock, "Goodbye!",
          { margin: 5 })

Could you, please, show me in code how to group those 2 nodes in rectangle, which can’t resize, but can move. Also, the nodes inside the group (rectangle) can’t move or resize?

Have you read the Intro pages? Many of your questions are covered under the various topics there, so I’d suggest reading that to familiarize yourself with the library.

You may also be interested in Table Panels.

I’ve read those articles, but they all refer to the same type of node.

We’d like to buy GoJS, but if we can’t make what we need and if we don’t get help, how can we buy it?

Could you, please, show me how to group two simple different types of nodes?

For example I can’t find how I can use go.GraphLinksModel with different types of nodes? Can I do it at all?

Did you see my post about node template maps earlier? For example, if you look at the Flowchart sample, there are a few different node templates defined, and in the model, categories are specified to determine how each of the node data should be represented.