NETWORK

Overview

Network

A network is a visual representation that uses a set of objects (called nodes or vertices) that are connected together. The connections between the nodes are called edges or links.

If a user configures the component by choosing the props:

  • nodes for "Nodes", a simple array of strings
  • links for "Links", an array of objects

then upon receiving the following message:

msg.payload = {
        "nodes": [
            {
                "id": "1",
                "radius": 8,
                "depth": 1
            },
            {
                "id": "2",
                "radius": 8,
                "depth": 1
            },
            {
                "id": "3",
                "radius": 8,
                "depth": 1
            }, // etc
        ],

        "links": [
            {
                "source": "0",
                "target": "1",
                "distance": 50
            },
            {
                "source": "1",
                "target": "1.0",
                "distance": 30
            },
            {
                "source": "1",
                "target": "1.1",
                "distance": 30
            }, // etc
        ]

    }
return msg;

the diagram is displayed. If another message arrives redefining the nodes or the links or both, the diagram updates.

Was this article helpful?

Powered by Zendesk