# MermaidFlowchartDocument

Describes a Mermaid flowchart or graph document.

 Class  

`ChartForgeX.Mermaid`

**Namespace**

`ChartForgeX.Mermaid`

**Assembly**

`ChartForgeX.Mermaid`

**Source**

[MermaidFlowchartDocument.cs:31](https://github.com/EvotecIT/ChartForgeX/blob/main/ChartForgeX.Mermaid/MermaidFlowchartDocument.cs#L31)

**Base**

`MermaidDocument`

Describes a Mermaid flowchart or graph document.

## Inheritance

- [MermaidDocument](/api/chartforgex-mermaid-mermaiddocument/)
- MermaidFlowchartDocument

## Derived Types

- [MermaidSwimlaneDocument](/api/chartforgex-mermaid-mermaidswimlanedocument/)
- [MermaidUseCaseDocument](/api/chartforgex-mermaid-mermaidusecasedocument/)

## Usage

 Explore 9 API references to this type 

This type appears in these public API surfaces even when no hand-authored example is attached directly to the page.

### Returned or exposed by 1

- Method [MermaidParser.ParseFlowchart](/api/chartforgex-mermaid-mermaidparser/#method-parseflowchart-string)

### Accepted by parameters 8

- Extension method [MermaidFlowchartDocument.ToPng](/api/chartforgex-mermaid-mermaidflowchartdocument/#extension-topng-chartforgex-mermaid-mermaidflowchartdocument-chartforgex-mermaid-mermaidflowchartrenderoptions) parameter `document`
- Extension method [MermaidFlowchartDocument.ToSvg](/api/chartforgex-mermaid-mermaidflowchartdocument/#extension-tosvg-chartforgex-mermaid-mermaidflowchartdocument-chartforgex-mermaid-mermaidflowchartrenderoptions) parameter `document`
- Extension method [MermaidFlowchartDocument.ToTopologyChart](/api/chartforgex-mermaid-mermaidflowchartdocument/#extension-totopologychart-chartforgex-mermaid-mermaidflowchartdocument-chartforgex-mermaid-mermaidflowchartrenderoptions) parameter `document`
- Extension method [MermaidFlowchartDocument.ToVisualArtifact](/api/chartforgex-mermaid-mermaidflowchartdocument/#extension-tovisualartifact-chartforgex-mermaid-mermaidflowchartdocument-chartforgex-mermaid-mermaidflowchartrenderoptions) parameter `document`
- Method [MermaidFlowchartRendering.ToPng](/api/chartforgex-mermaid-mermaidflowchartrendering/#method-topng-chartforgex-mermaid-mermaidflowchartdocument-chartforgex-mermaid-mermaidflowchartrenderoptions) parameter `document`
- Method [MermaidFlowchartRendering.ToSvg](/api/chartforgex-mermaid-mermaidflowchartrendering/#method-tosvg-chartforgex-mermaid-mermaidflowchartdocument-chartforgex-mermaid-mermaidflowchartrenderoptions) parameter `document`
- Method [MermaidFlowchartRendering.ToTopologyChart](/api/chartforgex-mermaid-mermaidflowchartrendering/#method-totopologychart-chartforgex-mermaid-mermaidflowchartdocument-chartforgex-mermaid-mermaidflowchartrenderoptions) parameter `document`
- Method [MermaidFlowchartRendering.ToVisualArtifact](/api/chartforgex-mermaid-mermaidflowchartrendering/#method-tovisualartifact-chartforgex-mermaid-mermaidflowchartdocument-chartforgex-mermaid-mermaidflowchartrenderoptions) parameter `document`

 Filter members   

    Show inherited   

 

## Constructors

 `public MermaidFlowchartDocument()` [#](#constructor-ctor) 

[MermaidFlowchartDocument.cs:31](https://github.com/EvotecIT/ChartForgeX/blob/main/ChartForgeX.Mermaid/MermaidFlowchartDocument.cs#L31)

## Inherited Methods

 `public virtual bool Equals(object? obj)` [#](#method-equals-object) 

Inherited from object

Parameters

**obj object? required**

Returns

 `bool` 

 `public virtual int GetHashCode()` [#](#method-gethashcode) 

Inherited from object

Returns

 `int` 

 `public Type GetType()` [#](#method-gettype) 

Inherited from object

Returns

 `Type` 

 `public virtual string? ToString()` [#](#method-tostring) 

Inherited from object

Returns

 `string?` 

## Properties

 `public MermaidFlowchartDirection Direction { get; set; }` [#](#property-direction) 

[MermaidFlowchartDocument.cs:28](https://github.com/EvotecIT/ChartForgeX/blob/main/ChartForgeX.Mermaid/MermaidFlowchartDocument.cs#L28)

Gets or sets the declared flowchart direction.

 `public List<MermaidRawStatement> Statements { get; }` [#](#property-statements) 

[MermaidFlowchartDocument.cs:31](https://github.com/EvotecIT/ChartForgeX/blob/main/ChartForgeX.Mermaid/MermaidFlowchartDocument.cs#L31)

Gets raw flowchart statements retained with source spans.

 `public List<MermaidFlowchartNode> Nodes { get; }` [#](#property-nodes) 

[MermaidFlowchartDocument.cs:34](https://github.com/EvotecIT/ChartForgeX/blob/main/ChartForgeX.Mermaid/MermaidFlowchartDocument.cs#L34)

Gets parsed flowchart node definitions and references.

 `public List<MermaidFlowchartEdge> Edges { get; }` [#](#property-edges) 

[MermaidFlowchartDocument.cs:37](https://github.com/EvotecIT/ChartForgeX/blob/main/ChartForgeX.Mermaid/MermaidFlowchartDocument.cs#L37)

Gets parsed flowchart edges.

 `public List<MermaidFlowchartSubgraph> Subgraphs { get; }` [#](#property-subgraphs) 

[MermaidFlowchartDocument.cs:42](https://github.com/EvotecIT/ChartForgeX/blob/main/ChartForgeX.Mermaid/MermaidFlowchartDocument.cs#L42)

Gets one canonical subgraph per ID in source first-ID order.

 `public List<MermaidStyleDefinition> ClassDefinitions { get; }` [#](#property-classdefinitions) 

[MermaidFlowchartDocument.cs:45](https://github.com/EvotecIT/ChartForgeX/blob/main/ChartForgeX.Mermaid/MermaidFlowchartDocument.cs#L45)

Gets parsed flowchart class definitions.

 `public List<MermaidFlowchartLinkStyle> LinkStyles { get; }` [#](#property-linkstyles) 

[MermaidFlowchartDocument.cs:48](https://github.com/EvotecIT/ChartForgeX/blob/main/ChartForgeX.Mermaid/MermaidFlowchartDocument.cs#L48)

Gets parsed flowchart link style declarations.

## Inherited Properties

 `public MermaidDiagramKind Kind { get; set; }` [#](#property-kind) 

[MermaidDocument.cs:91](https://github.com/EvotecIT/ChartForgeX/blob/main/ChartForgeX.Mermaid/MermaidDocument.cs#L91)

Inherited from [MermaidDocument](/api/chartforgex-mermaid-mermaiddocument/)

 `public bool IsDiagnosticOnly { get; }` [#](#property-isdiagnosticonly) 

[MermaidDocument.cs:94](https://github.com/EvotecIT/ChartForgeX/blob/main/ChartForgeX.Mermaid/MermaidDocument.cs#L94)

Inherited from [MermaidDocument](/api/chartforgex-mermaid-mermaiddocument/)

 `public string SourceText { get; set; }` [#](#property-sourcetext) 

[MermaidDocument.cs:97](https://github.com/EvotecIT/ChartForgeX/blob/main/ChartForgeX.Mermaid/MermaidDocument.cs#L97)

Inherited from [MermaidDocument](/api/chartforgex-mermaid-mermaiddocument/)

 `public MermaidSourceSpan HeaderSpan { get; set; }` [#](#property-headerspan) 

[MermaidDocument.cs:100](https://github.com/EvotecIT/ChartForgeX/blob/main/ChartForgeX.Mermaid/MermaidDocument.cs#L100)

Inherited from [MermaidDocument](/api/chartforgex-mermaid-mermaiddocument/)

 `public string Header { get; set; }` [#](#property-header) 

[MermaidDocument.cs:103](https://github.com/EvotecIT/ChartForgeX/blob/main/ChartForgeX.Mermaid/MermaidDocument.cs#L103)

Inherited from [MermaidDocument](/api/chartforgex-mermaid-mermaiddocument/)

 `public string? FrontMatter { get; set; }` [#](#property-frontmatter) 

[MermaidDocument.cs:106](https://github.com/EvotecIT/ChartForgeX/blob/main/ChartForgeX.Mermaid/MermaidDocument.cs#L106)

Inherited from [MermaidDocument](/api/chartforgex-mermaid-mermaiddocument/)

 `public VisualAccessibility Accessibility { get; }` [#](#property-accessibility) 

[MermaidDocument.cs:109](https://github.com/EvotecIT/ChartForgeX/blob/main/ChartForgeX.Mermaid/MermaidDocument.cs#L109)

Inherited from [MermaidDocument](/api/chartforgex-mermaid-mermaiddocument/)

 `public string? Theme { get; set; }` [#](#property-theme) 

[MermaidDocument.cs:112](https://github.com/EvotecIT/ChartForgeX/blob/main/ChartForgeX.Mermaid/MermaidDocument.cs#L112)

Inherited from [MermaidDocument](/api/chartforgex-mermaid-mermaiddocument/)

 `public MermaidSourceConfiguration Configuration { get; internal set; }` [#](#property-configuration) 

[MermaidDocument.cs:115](https://github.com/EvotecIT/ChartForgeX/blob/main/ChartForgeX.Mermaid/MermaidDocument.cs#L115)

Inherited from [MermaidDocument](/api/chartforgex-mermaid-mermaiddocument/)

 `public List<MermaidDirective> Directives { get; }` [#](#property-directives) 

[MermaidDocument.cs:118](https://github.com/EvotecIT/ChartForgeX/blob/main/ChartForgeX.Mermaid/MermaidDocument.cs#L118)

Inherited from [MermaidDocument](/api/chartforgex-mermaid-mermaiddocument/)

 `public List<MermaidRawStatement> RawStatements { get; }` [#](#property-rawstatements) 

[MermaidDocument.cs:121](https://github.com/EvotecIT/ChartForgeX/blob/main/ChartForgeX.Mermaid/MermaidDocument.cs#L121)

Inherited from [MermaidDocument](/api/chartforgex-mermaid-mermaiddocument/)

## Extension Methods

 `public static byte[] ToPng(MermaidFlowchartDocument document, MermaidFlowchartRenderOptions? options = null)` [#](#extension-topng-chartforgex-mermaid-mermaidflowchartdocument-chartforgex-mermaid-mermaidflowchartrenderoptions) 

[MermaidFlowchartRendering.cs:247](https://github.com/EvotecIT/ChartForgeX/blob/main/ChartForgeX.Mermaid/MermaidFlowchartRendering.cs#L247)

Renders a Mermaid flowchart document to static PNG through ChartForgeX topology rendering.

Parameters

**document ChartForgeX.Mermaid.MermaidFlowchartDocument required**

The parsed Mermaid flowchart document.

**options ChartForgeX.Mermaid.MermaidFlowchartRenderOptions? = null optional**

Optional conversion and rendering defaults.

Returns

 `byte[]` PNG bytes. 

 `public static string ToSvg(MermaidFlowchartDocument document, MermaidFlowchartRenderOptions? options = null)` [#](#extension-tosvg-chartforgex-mermaid-mermaidflowchartdocument-chartforgex-mermaid-mermaidflowchartrenderoptions) 

[MermaidFlowchartRendering.cs:235](https://github.com/EvotecIT/ChartForgeX/blob/main/ChartForgeX.Mermaid/MermaidFlowchartRendering.cs#L235)

Renders a Mermaid flowchart document to static SVG through ChartForgeX topology rendering.

Parameters

**document ChartForgeX.Mermaid.MermaidFlowchartDocument required**

The parsed Mermaid flowchart document.

**options ChartForgeX.Mermaid.MermaidFlowchartRenderOptions? = null optional**

Optional conversion and rendering defaults.

Returns

 `string` SVG markup. 

 `public static TopologyChart ToTopologyChart(MermaidFlowchartDocument document, MermaidFlowchartRenderOptions? options = null)` [#](#extension-totopologychart-chartforgex-mermaid-mermaidflowchartdocument-chartforgex-mermaid-mermaidflowchartrenderoptions) 

[MermaidFlowchartRendering.cs:22](https://github.com/EvotecIT/ChartForgeX/blob/main/ChartForgeX.Mermaid/MermaidFlowchartRendering.cs#L22)

Converts a Mermaid flowchart document into a renderer-independent topology chart.

Parameters

**document ChartForgeX.Mermaid.MermaidFlowchartDocument required**

The parsed Mermaid flowchart document.

**options ChartForgeX.Mermaid.MermaidFlowchartRenderOptions? = null optional**

Optional conversion and rendering defaults.

Returns

 `TopologyChart` A topology chart that can render to ChartForgeX SVG, HTML, PNG, and raster outputs. 

 `public static VisualArtifact ToVisualArtifact(MermaidFlowchartDocument document, MermaidFlowchartRenderOptions? options = null)` [#](#extension-tovisualartifact-chartforgex-mermaid-mermaidflowchartdocument-chartforgex-mermaid-mermaidflowchartrenderoptions) 

[MermaidFlowchartRendering.cs:193](https://github.com/EvotecIT/ChartForgeX/blob/main/ChartForgeX.Mermaid/MermaidFlowchartRendering.cs#L193)

Wraps a Mermaid flowchart document in a product-neutral visual artifact envelope backed by a topology chart.

Parameters

**document ChartForgeX.Mermaid.MermaidFlowchartDocument required**

The parsed Mermaid flowchart document.

**options ChartForgeX.Mermaid.MermaidFlowchartRenderOptions? = null optional**

Optional conversion and rendering defaults.

Returns

 `VisualArtifact` A visual artifact envelope. 

<!-- PowerForge markdown artifact sha256:F2EFC9A487947D3D27B3BD44B772BB5C49D0C230CDFE7B69056F9964A482F9B7 -->
