How to convert csv file to json network diagram for display using sigma.js

I am studying if I can generate network diagrams using sigma.js (or equivalent) from a table dataset (in MYSQL). From my research it can be seen that the json format for sigma.js requires x, y and a size value for each node, which assumes a "diagram", i.e. relative x and y positions and size are already set.

I'm still not familiar with network diagrams, but it seems that the missing link between sigma.js and my data is data generation x, y, size, data. generating json from php, as soon as I have these variables, it will obviously be a trivial question, but I have no idea how I can do this, and Google did not give any libraries. There are standalone applications, but this is not good, because you need to sit in a web application.

Perhaps I do not know what to look for, to find what I need.

Does anyone know how I could generate such network diagram information in php or provide any pointers?

Thanks,

Floor

+5
source share

Source: https://habr.com/ru/post/1237329/


All Articles