1.0.0 • Published 5 years ago

@linktime/dependency-graph v1.0.0

Weekly downloads
1
License
MIT
Repository
bitbucket
Last release
5 years ago

Dependency Graph


Usage

const graph = new Graph({ width, height }, { layout, direction })

Data Structure

{
  nodes: [
    {
      id: {{ nodeId }},
      shape: 'circle|rect',
      radius: {{ number }},
      width: {{ number }},
      height: {{ number }},
      customNode: {{ function }},
      style: {
        color: {{ hexColor }},
        opacity: {{ number: 0 -> 1 }},
        border: {
          color: {{ hexColor }},
          width: {{ number }}
        }
      }
    }
  ],
  links: [{
    source: {{ sourceNodeId }},
    target: {{ targetNodeId }},
    anchor: {
      source: 'auto|left|right|top|bottom',
      target: 'auto|left|right|top|bottom'
    },
    endpoints: [
      {
        color: {{ hexColor }},
        height: {{ number }},
        width: {{ number }},
        shape: 'arrow|square'
      }
    ],
    style: {
      color: {{ hexColor }},
      width: {{ number }}
    }
  }]
}

1.0.0

5 years ago