dhotson / springy

A force directed graph layout algorithm in JavaScript
http://getspringy.com
MIT License
1.88k stars 240 forks source link

Undirected graphs via JSON #75

Closed AlpOzturk closed 9 years ago

AlpOzturk commented 9 years ago

When creating a force directed graph via JSON and springyui, what can I do to ensure that the edges are not directional (i.e. are line segments, don't have arrow heads).

dhotson commented 9 years ago

Hi,

You can give edges a directional property to specify whether you want arrows drawn or not.

If you're using graph.loadJSON to load data, it might look something like this:

graph.loadJSON({
  nodes: [ "a", "b"],
  edges: [
    ["a", "b", { directional: false }]
  ]
})
AlpOzturk commented 9 years ago

Thank you!

-Alp

On Tue, Jul 21, 2015 at 4:21 PM, Dennis Hotson notifications@github.com wrote:

Hi,

You can give edges a directional property to specify whether you want arrows drawn or not.

If you're using graph.loadJSON to load data, it might look something like this:

graph.loadJSON({ nodes: [ "a", "b"], edges: [ ["a", "b", { directional: false }] ] })

— Reply to this email directly or view it on GitHub https://github.com/dhotson/springy/issues/75#issuecomment-123506126.