question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

startForceAtlas2 doesn't appear to have an effect (no animation)

See original GitHub issue

Just taking baby steps with this library in loading up some information from json and rendering it. I want to ‘auto-layout’ the nodes, which from what I gather from other issues means I need to run a layout procedure. A couple questions:

  1. why doesn’t the below work? (renders graph but doesn’t animate moving nodes)
  2. is there a CDN for sigma (to include the plugins for reading json)?
  3. meta-question: parsing my initial data in python and assigning random x,y currently. Could I not assign any x,y and have sigma attempt a layout upon initialization of the graph?
s = new sigma({
  container: 'graph-container'
});

sigma.parsers.json(
  'test.json',
  s,
  function() {
    s.refresh();
  }
);

s.startForceAtlas2({worker: true, barnesHutOptimize: false});

Issue Analytics

  • State:closed
  • Created 8 years ago
  • Comments:5

github_iconTop GitHub Comments

1reaction
Yomguitherealcommented, Sep 29, 2015

Hello @storrgie. Your problem is with JS’s asynchronous behavior here. When you start the layout, your graph hasn’t actually been loaded yet. You should try the following:

s = new sigma({
  container: 'graph-container'
});

sigma.parsers.json(
  'test.json',
  s,
  function() {
    s.refresh();
    s.startForceAtlas2({worker: true, barnesHutOptimize: false});
  }
);
0reactions
stale[bot]commented, Oct 9, 2021

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

Read more comments on GitHub >

github_iconTop Results From Across the Web

ForceAtlas2, a Continuous Graph Layout Algorithm for Handy ...
It allows users to have a trial-error approach to the layout, that improves the learning curve of Gephi. We developed ForceAtlas2 by combining ......
Read more >
Layout animation not working on first run - Stack Overflow
I've setup my animationListener in my activity and started my slide in animation onClick of an item. My problem is, the first time...
Read more >
Chapter 9. Dynamic graphs: how to show data over time
How to present data when it has a date/time element; What to do with data that changes over time; How to deal with...
Read more >
Add forceAtlas2 — force • sigmajs - John Coene
Whether to compute the cumulative sum of the delay. Details. The delay helps for build dynamic visualisations where nodes and edges do not...
Read more >
Graph Drawing and Network Visualization - Springer Link
On the Maximum Number of Crossings in Star-Simple Drawings of Kn with No Empty ... well as other criteria which have not yet...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found