Questions tagged [msagl]

MSAGL is a .NET tool for graph layout and viewing.

MSAGL is a .NET tool for graph layout and viewing. It was developed in Microsoft by Lev Nachmanson, Sergey Pupyrev, Tim Dwyer and Ted Hart. MSAGL is available as open source at https://github.com/Microsoft/automatic-graph-layout

18 questions
4
votes
2 answers

Get the Vertex(Node) Object user clicked on in MSAGL

So, what is the way to retrieve the object that was under the mouse pointer when user clicked? I assume the gViewer must have some event to do that. In the tutorial i found this idea: gViewer.SelectionChanged += new…
TheSmokingGnu
  • 302
  • 2
  • 6
  • 15
4
votes
1 answer

MSAGL: Update visible graph (add edge)

I am building a simple sample application to test out MSAGL but am getting a KeyNotFoundException if I add an edge after the graph is shown. I suppose this has to do with that I need to somehow refresh some data - or perhaps use another approach,…
Bent Rasmussen
  • 5,538
  • 9
  • 44
  • 63
2
votes
1 answer

MSAGL: Can you force edge lines to be drawn from a fixed location on a node like the node's four cardinal border midpoints?

Is it possible to force edge lines to be drawn from the node's four cardinal border midpoints? i.e. the twelve o'clock, three o'clock, six o'clock, and nine o'clock locations on the node border, akin to connectors in Visio or PowerPoint.
amonroejj
  • 573
  • 4
  • 16
2
votes
1 answer

How to set specific point to a node in MSAGL

I'm trying to draw some graph using the Microsoft's MSAGL. Here I have some nodes, but is there a way to set their position using Points? I need to place up to hundred points to specific places in this picture and let the algorithm to route…
DeadlyHigh
  • 94
  • 8
2
votes
1 answer

C# MSAGL- display styles

This is a winform application in C# with MSAGL. I'm trying to change the color of the gray zone to white,and change the font style of the Node, what should I do to set them?
nineveh.Y
  • 167
  • 7
2
votes
1 answer

C# MSAGL change icons

I build an winforms application in c#. I'm trying to change the default icons of MSAGL GViewer component: but I don't find where to do that. How can I change them?
Cuzi
  • 1,026
  • 10
  • 16
1
vote
1 answer

Prevent coincident edges in Microsoft Automatic Graph Layout (Rectilinear)

I am using the rectilinear edge router of the Microsoft Automatic Graph Layout library to perform routing of edges between nodes. One of the problems I am having with it is that it does not seem to try at all to avoid coincident edges. (See…
Mike Nakis
  • 56,297
  • 11
  • 110
  • 142
1
vote
1 answer

In MSAGL how to specify the layout direction for Sugiyama layout option?

By default, MSAGL graph library displays the Sugiyama layout which renders nodes from top to bottom, vertically . I need the graph to be rendered horizontally instead of vertically? How can this be achieved? I could not find a setting which allows…
Kim Smith
  • 105
  • 8
1
vote
1 answer

MSAGL: GraphViewerGdi: How to programmatically reset the zoom (or programmatically press the Home button to reset it)?

I want to right click on a node to zoom into that node, then right click again to completely reset the zoom and pan to its starting state. Furthermore, I may in future wish to hide the viewer's built-in toolbar and perform the zoom-out with a…
amonroejj
  • 573
  • 4
  • 16
1
vote
1 answer

C# MSAGL - How to create: Title, Subtitle on nodes and Tooltip on edge

I'm trying to build a graph that will represent DB relations so I would like each node to have a title with the table name and sub title which will represent the different keys of the table and on the edge a string with the relation such as:"each…
Rea B.
  • 79
  • 8
1
vote
3 answers

Routing only edges with MSAGL

Is there a way to route only edges in existing layout with MSAGL? I have a GeometryGraph object with layout generated using LayeredLayout and I want to remove/add edges without running the layout algorithm again (this operation makes drastic changes…
ghord
  • 13,260
  • 6
  • 44
  • 69
0
votes
0 answers

MSAGL Sub-graph 'Collapse' button not visible

I am testing using Microsoft MSAGL to create a graph with Subgraphs. The API suggests there is a button to 'collapse' a sub-graph but the button is never visible. My Code is of the form var SubGraph = new MSAGL.Subgraph("Test"); …
0
votes
1 answer

How to integrate a graph in Microsoft Automatic Graph Layout (msagl) to a particular form so that in I can drag the graph as it is a Button or textBox

I am new to using C# and trying to create a Windows Form App project. Form1.Designer.cs is here and below is the Form1.cs (the form that I intend to create) using System; using System.Windows.Forms; namespace LearnCSharp { public partial class…
sempraEdic
  • 132
  • 9
0
votes
0 answers

MSAGL: How to neutralize the graphics transform in DrawNodeDelegate so that owner drawing can always begin with top left as 0,0?

I am using a NodeBoundaryDelegate to owner-draw my nodes. Is it possible to neutralize the graphics transform in DrawNodeDelegate so that this owner drawing can always begin with top left of the relevant area as 0,0? Msagl.Drawing.Node's coordinate…
amonroejj
  • 573
  • 4
  • 16
0
votes
1 answer

Space around disconnected nodes in MSAGL (WinForms)

I'm trying to enforce a minimum distance between un-connected nodes in MSAGL (WinForms), version 1.1.3. The user creates a graph from scratch. This involves creating nodes, and dragging between nodes to create edges. But all nodes that don't have…
1
2