techniq / layerchart

Composable Svelte chart components to build a wide range of visualizations
https://www.layerchart.com
MIT License
538 stars 11 forks source link

Directed Acyclic Graphs (DAG) #30

Open techniq opened 2 years ago

techniq commented 2 years ago
techniq commented 4 months ago

Also, based on this notice...

image

but be worth looking at graphology or sigma, although d3-dag might be sufficient for now

regexident commented 4 months ago

There is also webcola (aka cola.js), which provides support for an alternative layout algorithm based on (afaik)

Dwyer, Tim & Koren, Yehuda. (2005). DIG-COLA: Directed Graph Layout through Constrained Energy Minimization.. Proceedings of IEEE Symposium on Information Visualization. 9. 10.1109/INFVIS.2005.1532130.

… and much more.

techniq commented 4 months ago

Thanks @regexident, I forgot about webcola.

With that said, I do like the visual output of the different d3-dag layouts, but it could just come down to examples created. I prefer to have a stable layout vs a simulation most of the time, although a simulation can be made to look "static" most of the time.

It's always tricky to find the best solution that is both easy to use for the 80-90% use cases, but can hopefully approach handling 100% of the use cases if needed). We can also provide multiple layout components that use a different library/algorithm/layout/approach if needed.

I haven't really dived deep into this space to understand the pro/cons for each (simplicity, library size, performance, etc).

regexident commented 4 months ago

One difficulty I would with d3-dag is its need to provide node sizes upfront, which can be tricky if your nodes are not of a predetermined size, but e.g. depend on whatever your styles for them define.

techniq commented 4 months ago

Yeah, that is typically a challenge with the more "static" layouts (same with the d3-hierarchy layouts).