dash14 / v-network-graph

An interactive network graph visualization component for Vue 3
https://dash14.github.io/v-network-graph/
MIT License
485 stars 44 forks source link

Automatic layout #64

Closed stevro closed 2 years ago

stevro commented 2 years ago

First of all I find this library quite good already.

I'd love to see a new feature of automatically creating the layout based on the nodes and edges.

At least a sample of code for building a basic tree layout in the Miscellaneous section would be great.

dash14 commented 2 years ago

Hi @stevro, Sorry for the late reply. Thank you for your feedback!

For now, automatic layout is considered outside the scope of this library, and there are no immediate plans to add this functionality. However, I recognize its usefulness. To address this at the moment, I made an example of a tree layout. (in the "Layout / Positioning" section) https://dash14.github.io/v-network-graph/examples/layout.html#automatic-layout Please note that the latest version, v0.5.18, is required to run this example at hand.

I hope this helps you.

stevro commented 2 years ago

Great example, and thanks for pointing out that there are other libraries that can compute the coordinates for a directed graph.