FlowchartDiagram Class
A flowchart: nodes of various shapes linked by edges, grouped in subgraphs, laid out in ranks in the direction of the flow (Mermaid flowchart).
public sealed class FlowchartDiagram : Diagram- Inheritance
DiagramFlowchartDiagram
Constructors
| Name | Description |
|---|---|
| FlowchartDiagram() |
FlowchartDiagram()
FlowchartDiagram.cspublic FlowchartDiagram()No documentation is available.
Properties
| Name | Description |
|---|---|
| ClassDefinitions | Gets the styles of the classes of the nodes, subgraphs and edges, by name (Mermaid classDef). The class default applies to every node. |
| Curve | Gets or sets the curve of the edges. The default is EdgeCurve.Basis. |
| DefaultEdgeStyle | Gets or sets the style of every edge, which the style of an edge takes precedence over (Mermaid linkStyle default). |
| Direction | Gets or sets the direction of the flow. The default is DiagramDirection.TopToBottom. |
| Edges | Gets the edges, drawn in order. |
| NodeSpacing | Gets or sets the space between two nodes of a rank, in pixels. The default is 50. |
| Nodes | Gets the nodes. The nodes of the subgraphs that are not in this list are drawn too. |
| RankSpacing | Gets or sets the space between two ranks, in pixels. The default is 50. |
| Subgraphs | Gets the top-level subgraphs. |
| Swimlanes | Gets or sets a value that indicates whether the top-level subgraphs are drawn as swimlanes: bands across the diagram, in their order, that hold their nodes (Mermaid swimlane-beta). The nested subgraphs are boxes in their lane. |
| WrappingWidth | Gets or sets the width at which the labels wrap, in pixels, or null to wrap them only at their line feeds. The default is 200. |
ClassDefinitions
FlowchartDiagram.csGets the styles of the classes of the nodes, subgraphs and edges, by name (Mermaid classDef). The class default applies to every node.
public IDictionary<string, DiagramStyle> ClassDefinitions { get; }Property value
Curve
FlowchartDiagram.csGets or sets the curve of the edges. The default is EdgeCurve.Basis.
public EdgeCurve Curve { get; set; }Property value
DefaultEdgeStyle
FlowchartDiagram.csGets or sets the style of every edge, which the style of an edge takes precedence over (Mermaid linkStyle default).
public DiagramStyle? DefaultEdgeStyle { get; set; }Property value
Direction
FlowchartDiagram.csGets or sets the direction of the flow. The default is DiagramDirection.TopToBottom.
public DiagramDirection Direction { get; set; }Property value
Edges
FlowchartDiagram.csNodeSpacing
FlowchartDiagram.csGets or sets the space between two nodes of a rank, in pixels. The default is 50.
public double NodeSpacing { get; set; }Nodes
FlowchartDiagram.csGets the nodes. The nodes of the subgraphs that are not in this list are drawn too.
public IList<FlowchartNode> Nodes { get; }Property value
RankSpacing
FlowchartDiagram.csGets or sets the space between two ranks, in pixels. The default is 50.
public double RankSpacing { get; set; }Subgraphs
FlowchartDiagram.csSwimlanes
FlowchartDiagram.csWrappingWidth
FlowchartDiagram.csGets or sets the width at which the labels wrap, in pixels, or null to wrap them only at their line feeds. The default is 200.
public double? WrappingWidth { get; set; }Methods
| Name | Description |
|---|---|
| AddEdge(FlowchartElement, FlowchartElement, DiagramText?) | Adds an edge. |
| AddEdge(string, string, DiagramText?) | Adds an edge between two elements found by identifier; a missing node is added. |
| AddNode(string, DiagramText?, FlowchartNodeShape) | Adds a node. |
| AddSubgraph(string, DiagramText?) | Adds a top-level subgraph. |
| EnumerateSubgraphs() | Enumerates the subgraphs and their nested subgraphs, depth first. |
| Find(string) | Finds a node or a subgraph by identifier. |
AddEdge overloads
AddEdge(FlowchartElement, FlowchartElement, DiagramText?)
FlowchartDiagram.csAdds an edge.
public FlowchartEdge AddEdge(FlowchartElement source, FlowchartElement target, DiagramText? label = null)Parameters
sourceFlowchartElement- The element the edge starts from.
targetFlowchartElement- The element the edge goes to.
labelDiagramText?- The text of the edge, or
nullfor none.
Returns
FlowchartEdge The edge.
AddEdge(string, string, DiagramText?)
FlowchartDiagram.csAdds an edge between two elements found by identifier; a missing node is added.
public FlowchartEdge AddEdge(string sourceId, string targetId, DiagramText? label = null)Parameters
sourceIdstring- The identifier of the element the edge starts from.
targetIdstring- The identifier of the element the edge goes to.
labelDiagramText?- The text of the edge, or
nullfor none.
Returns
FlowchartEdge The edge.
AddNode(string, DiagramText?, FlowchartNodeShape)
FlowchartDiagram.csAdds a node.
public FlowchartNode AddNode(string id, DiagramText? label = null, FlowchartNodeShape shape = FlowchartNodeShape.Rectangle)Parameters
idstring- The identifier of the node, unique in the flowchart.
labelDiagramText?- The text of the node, or
nullto show its identifier. shapeFlowchartNodeShape- The shape of the node.
Returns
FlowchartNode The node.
AddSubgraph(string, DiagramText?)
FlowchartDiagram.csAdds a top-level subgraph.
public FlowchartSubgraph AddSubgraph(string id, DiagramText? title = null)Parameters
idstring- The identifier of the subgraph, unique in the flowchart.
titleDiagramText?- The title, or
nullto show the identifier.
Returns
FlowchartSubgraph The subgraph.
EnumerateSubgraphs()
FlowchartDiagram.csEnumerates the subgraphs and their nested subgraphs, depth first.
public IEnumerable<FlowchartSubgraph> EnumerateSubgraphs()Returns
IEnumerable<FlowchartSubgraph> The subgraphs.
Find(string)
FlowchartDiagram.csFinds a node or a subgraph by identifier.
public FlowchartElement? Find(string id)