Class Graph
Graph is a collection of connected nodes ( basically SymbolBase derived objects linked connected with links ).
Inheritance
Namespace: Syncfusion.Windows.Forms.Diagram
Assembly: Syncfusion.Diagram.Base.dll
Syntax
public class Graph : Object, IGBounds, IGTransform
Constructors
Graph()
Initializes a new instance of the Graph class.
Declaration
public Graph()
Graph(Boolean, Single, Single)
Initializes a new instance of the Graph class.
Declaration
public Graph(bool improvePerformance, float leftMargin, float topMargin)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Boolean | improvePerformance | Determines whether performance needs to be improved. |
| System.Single | leftMargin | The left margin of the graph. |
| System.Single | topMargin | The top margin of the graph. |
Properties
BiggestDimensions
Gets list of biggest dimensions in every level.
Declaration
public ArrayList BiggestDimensions { get; }
Property Value
| Type |
|---|
| System.Collections.ArrayList |
BottomBoundingNode
Gets graph bottom bounding node.
Declaration
public IGBounds BottomBoundingNode { get; }
Property Value
| Type |
|---|
| IGBounds |
Bounds
Gets Graph bounding rectangle.
Declaration
public RectangleF Bounds { get; }
Property Value
| Type |
|---|
| System.Drawing.RectangleF |
Center
Gets or sets graph Center location.
Declaration
public PointF Center { get; set; }
Property Value
| Type |
|---|
| System.Drawing.PointF |
FictitiousNodes
Gets fictitious nodes what insert between ranks.
Declaration
protected ArrayList FictitiousNodes { get; }
Property Value
| Type |
|---|
| System.Collections.ArrayList |
GraphNodes
Gets or sets hashtable containing graph nodes.
Declaration
public Hashtable GraphNodes { get; set; }
Property Value
| Type |
|---|
| System.Collections.Hashtable |
GraphType
Gets graph type. GraphType
Declaration
public GraphType GraphType { get; }
Property Value
| Type |
|---|
| GraphType |
Height
Gets or sets graph Height.
Declaration
public float Height { get; set; }
Property Value
| Type |
|---|
| System.Single |
LeftBoundingNode
Gets graph left bounding node.
Declaration
public IGBounds LeftBoundingNode { get; }
Property Value
| Type |
|---|
| IGBounds |
Location
Gets or sets graph location.
Declaration
public PointF Location { get; set; }
Property Value
| Type |
|---|
| System.Drawing.PointF |
ResizeNodes
Gets or sets a value indicating whether nodes should be resized when graph size changes.
Declaration
public bool ResizeNodes { get; set; }
Property Value
| Type |
|---|
| System.Boolean |
RightBoundingNode
Gets graph right bounding node.
Declaration
public IGBounds RightBoundingNode { get; }
Property Value
| Type |
|---|
| IGBounds |
Size
Gets or sets graph Size.
Declaration
public SizeF Size { get; set; }
Property Value
| Type |
|---|
| System.Drawing.SizeF |
TopBoundingNode
Gets graph top bounding node.
Declaration
public IGBounds TopBoundingNode { get; }
Property Value
| Type |
|---|
| IGBounds |
TypeOrdered
Gets graph presentation as rank ordered hashtable according to graph type.GraphType If
Declaration
public ArrayList TypeOrdered { get; }
Property Value
| Type |
|---|
| System.Collections.ArrayList |
Width
Gets or sets graph Width.
Declaration
public float Width { get; set; }
Property Value
| Type |
|---|
| System.Single |
X
Gets or sets graph X coordinate.
Declaration
public float X { get; set; }
Property Value
| Type |
|---|
| System.Single |
Y
Gets or sets graph Y coordinate.
Declaration
public float Y { get; set; }
Property Value
| Type |
|---|
| System.Single |
Methods
AppendTransfomChanges()
Append all position and size transformation to graph nodes.
Declaration
public void AppendTransfomChanges()
AppendTransformChanges()
Append all position and size transformation to graph nodes.
Declaration
public void AppendTransformChanges()
CheckDimensions(IGBounds, Int32)
Checks the dimensions.
Declaration
public void CheckDimensions(IGBounds nodeToCompare, int nRank)
Parameters
| Type | Name | Description |
|---|---|---|
| IGBounds | nodeToCompare | The node to compare. |
| System.Int32 | nRank | The rank number. |
CheckRankDimensions()
Checks the rank dimensions.
Declaration
public void CheckRankDimensions()
GetGraphFirstTopNode()
Gets first GraphNode which contains no parents.
Declaration
public GraphNode GetGraphFirstTopNode()
Returns
| Type | Description |
|---|---|
| GraphNode | Node found. |
RecalculateBounds()
Recalculates graph bounds.
Declaration
public void RecalculateBounds()
Rotate(Single)
Rotates the node a specified number of degrees about its center point.
Declaration
public void Rotate(float fDegree)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Single | fDegree | Number of degrees to rotate. |
RotateAt(PointF, Single)
Rotates the node a specified number of degrees about a given anchor point.
Declaration
public void RotateAt(PointF ptAnchor, float fDegree)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Drawing.PointF | ptAnchor | Fixed point about which to rotate. |
| System.Single | fDegree | Number of degrees to rotate. |
Scale(Single, Single)
Scales the specified f scale X.
Declaration
public void Scale(float fScaleX, float fScaleY)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Single | fScaleX | The X scale factor. |
| System.Single | fScaleY | The Y scale factor. |
Translate(Single, Single)
Moves the node by the given X and Y offsets.
Declaration
public void Translate(float dx, float dy)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Single | dx | Distance to move along X axis. |
| System.Single | dy | Distance to move along Y axis. |