markdown-links icon indicating copy to clipboard operation
markdown-links copied to clipboard

Generated graph is chaotic

Open tchayen opened this issue 4 years ago • 2 comments

In the library I am using D3 force for force-directed graph drawing which is a way of generating graphs that look good enough in most cases and is easy enough to implement (or to come up with in the first place).

Unfortunately the more I use it, the more problems with it I encounter:

  1. Graph is non-deterministic. Each time, due to randomness in its behaviour, entirely different graph might be generated. This one should be possible to solve in current approach (however initial tries failed).
  2. Lack of non-invasive additions. Each time a node is added, the whole graph is regenerated (which bumps into problem 1). Ideally, it should stay exactly the same and only run a portion of simulation ticks to give the node 'correct' (in terms of distance to other nodes) place. This one should be possible to solve in current approach.

tchayen avatar May 23 '20 22:05 tchayen

@tchayen Speaking of which, did you look at Juggl? So far, being the graph library for Obsidian, it made available the smooth transitions between additions and other changes. Mention me if you need help implementing it or when you have any comment on why it may not be feasible.

vintprox avatar Oct 24 '21 18:10 vintprox

I think it wasn't available or at least I wasn't aware of it when I created markdown-links. Now it would make sense to rewrite implementation here to use something similar.

I don't have enough time recently to go through the rewrite but if you are interested in doing it in any extent – I am happy to help with any tips I can give.

tchayen avatar Oct 26 '21 22:10 tchayen