JIT: How to specify source/sink for arcs?

Posted by Rosarch on Stack Overflow See other posts from Stack Overflow or by Rosarch
Published on 2010-06-06T05:53:10Z Indexed on 2010/06/06 6:02 UTC
Read the original article Hit count: 478

Filed under:
|
|

I'm using JIT to render graphs. I'm using the RGraph feature.

This JSON defines a graph:

var json = [


    {
        'id': '1',
        'name': 'CS 2110',
        'adjacencies': ['0', '2']
    },

    {
        'id': '1.5',
        'name': 'INFO 2300',
        'adjacencies': ['1']
    },

    {
        'id': '0',
        'name': 'CS 1110',
        'adjacencies': ['1']
    },

    {
        'id': '2',
        'name': 'INFO 3300',
        'adjacencies': ['1']
    },

]

If I want a directed graph, how can I specify which nodes are sources and which are sinks?

© Stack Overflow or respective owner

Related posts about JavaScript

Related posts about graph