microsoft / automatic-graph-layout

A set of tools for graph layout and viewing
Other
1.35k stars 304 forks source link

webmsagl package? how to use it inside a FE (JS\React\Angular) project? #242

Open assafsun opened 4 years ago

assafsun commented 4 years ago

Hi,

I tried to take webmsagl JS and TS code and use it inside a react project but I got multiple warnings and errors due to the JS compilation after I ran the layout code from ggraph.

I will appreciate any help with the following:

  1. Is there a webmsagl package?
  2. How to consume webmsagl code in a React\Angular or any JS project?

Thanks for the help, Assaf

FilippoPolo commented 4 years ago

Hello Assaf,

Unfortunately, there is no WebMSAGL package yet. I've just tried building and running the samples (in the WebMsagl/WebMsagl.sln solution) and they seem to work, though. The samples show how to use WebMSAGL.

Best, Filippo

ghost commented 4 years ago

WebMsagl doesn't compile on .NET Core on Linux as it depends on VS Build magic. Core and Drawing build and run fine under .NET Core on Linux. This means the only way to display graphs for a Linux/Mac dev is to output to SVG (ignoring wpf/winforms), which reduces the opportunities for MsAgl to really shine.

Essentially means that it is very difficult to test out the WebMsagl project, let alone convince web developers to support msagl files. If there is a way for this repo to use some sort of CI/CD to add the webmsagl as a package to the 'release' page , I think that would be a quick way to get more people using this repo. As a byproduct of this, exorcising visual studio from the build process would make it easier in the future when you want to release packages for the web component.