Using The Core Layout engine (AutomaticGraphLayout.dll) in blazor

NALB 71 Reputation points
2023-07-12T12:17:42.51+00:00

Hello , i have been trying to use this automatic graph layout (AutomaticGraphLayout.dll) in my application to only get the positions of the node .. however i cannot find a documentation of that can you provide me with examples ...

i have a graph data structure i created which has a list of my nodes and edges .

the edge has inside it source node and target node .

i wanna provide that to the library and get the positions of x and y .

i am using blazor server side .

Thank you in advance

Developer technologies .NET Blazor
0 comments No comments
{count} votes

3 answers

Sort by: Most helpful
  1. Bruce (SqlWork.com) 77,686 Reputation points Volunteer Moderator
    2023-07-12T17:05:37.1966667+00:00

    the repo has samples:

    https://github.com/microsoft/automatic-graph-layout

    as to display you would need to do js interop to access the canvas, you might also be interested in a javascript version. there are several, but here a ms one with good documentation.

    https://github.com/microsoft/msagljs

    note: if your use case is display only, then the server can produce a bitmap that is displayed as an image. If this is an interactive, then I'd use a javascript library to produce the layout, and the javascript ship to blazor the data. You would not want to be sending mouse events to the server and back for the layout changes or trying to update a canvas via interop.

    0 comments No comments

  2. ashir chaudhary 5 Reputation points
    2023-07-12T22:23:28.82+00:00

    To use the Core Layout engine (AutomaticGraphLayout.dll) in a Blazor application, you can follow these steps:

    .In your Blazor component or page where you want to use the layout engine, import the necessary namespaces by adding the appropriate using statements at the top of the file. For

    0 comments No comments

  3. ashir chaudhary 5 Reputation points
    2023-07-15T10:57:33.0733333+00:00

    To use the Core Layout engine (AutomaticGraphLayout.dll) in Blazor, you can follow these steps:

    1. Add a reference to the AutomaticGraphLayout.dll library in your Blazor project. You can typically do this by right-clicking on the project in the Solution Explorer, selecting "Add Reference," and browsing for the DLL file.

    Once the reference is added, you can start using the Core Layout engine in your Blazor components. Import the necessary namespaces at the top of your component file to access the required classes and methods.

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.