highcharts icon indicating copy to clipboard operation
highcharts copied to clipboard

Network graph - Algorithm

Open kogratte opened this issue 11 months ago • 3 comments

Description of the feature

Your positionning algorithm is akward and not performant at all. Some libs, like vis-network, are using a decent one, but does not offer your api.

I would like to be able to pick a layout algorithm from anywhere, and use it to place nodes.

Library related to the feature

vis-network (https://visjs.github.io/vis-network/docs/network/)

Proof of Concept/Live example for the feature


You can vote for this feature by adding a thumbs-up reaction to this post.

kogratte avatar Mar 18 '24 07:03 kogratte

Hi @kogratte!

Thank you for the feedback. Technically you can adjust the layout algorithm via options.


I would like to be able to pick a layout algorithm from anywhere, and use it to place nodes.

I'm not sure how this should work, could you please elaborate?

karolkolodziej avatar Mar 19 '24 07:03 karolkolodziej

Hey @karolkolodziej , thanks for coming back to me on this topic!

I'm having issues with the rendering algorithm, when working with complex networks (cf joined image). image

This output is impacted by another issue I opened, which is I cannot move a single node without another one being moved as well (magic...), but this is not what I'm trying to point right now.

As you may have seen in the attachment, our "graph" is quiet complex, as it involves those kind of items:

  • Providers
  • Regions
  • Routers
  • Clients / Apps

Each level has a 1-n relation with the following one, and routers have a n-n relation to other routers (each router having at least one relation). They cannot be orphan nodes in our tree (that's important).

I tried a lot of combination with layout options, but I've never been able to get a decent layout, without proper positioning according nodes weight.

For example, let's take a look at the excellent vis-network library. https://visjs.github.io/vis-network/examples/network/basic_usage/standalone.html

Their modules can be used as standalone, due to a "recent" refactorisation.

The point here is to be able to pick their algorithm, or any other one picked on the internet, and use it to generate node positions.

For the time being, we can use "random", "circle", or provide a function which returns [x, y].

But those are only initial positions..

kogratte avatar Mar 19 '24 08:03 kogratte

Thank you for the explanation! For now, only one type of algorithm is available but it is a good idea to extend it or give the ability for users to implement their own.

karolkolodziej avatar Mar 20 '24 07:03 karolkolodziej