# MermaidGitGraphDocument

Describes a parsed Mermaid git graph diagram.

 Class  

`ChartForgeX.Mermaid`

**Namespace**

`ChartForgeX.Mermaid`

**Assembly**

`ChartForgeX.Mermaid`

**Source**

[MermaidGitGraphDocument.cs:12](https://github.com/EvotecIT/ChartForgeX/blob/main/ChartForgeX.Mermaid/MermaidGitGraphDocument.cs#L12)

**Base**

`MermaidDocument`

**Modifiers**

sealed

Describes a parsed Mermaid git graph diagram.

## Inheritance

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

## 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.ParseGitGraph](/api/chartforgex-mermaid-mermaidparser/#method-parsegitgraph-string)

### Accepted by parameters 8

- Extension method [MermaidGitGraphDocument.ToGitGraphBlock](/api/chartforgex-mermaid-mermaidgitgraphdocument/#extension-togitgraphblock-chartforgex-mermaid-mermaidgitgraphdocument-chartforgex-mermaid-mermaidgitgraphrenderoptions) parameter `document`
- Extension method [MermaidGitGraphDocument.ToPng](/api/chartforgex-mermaid-mermaidgitgraphdocument/#extension-topng-chartforgex-mermaid-mermaidgitgraphdocument-chartforgex-mermaid-mermaidgitgraphrenderoptions) parameter `document`
- Extension method [MermaidGitGraphDocument.ToSvg](/api/chartforgex-mermaid-mermaidgitgraphdocument/#extension-tosvg-chartforgex-mermaid-mermaidgitgraphdocument-chartforgex-mermaid-mermaidgitgraphrenderoptions) parameter `document`
- Extension method [MermaidGitGraphDocument.ToVisualArtifact](/api/chartforgex-mermaid-mermaidgitgraphdocument/#extension-tovisualartifact-chartforgex-mermaid-mermaidgitgraphdocument-chartforgex-mermaid-mermaidgitgraphrenderoptions) parameter `document`
- Method [MermaidGitGraphRendering.ToGitGraphBlock](/api/chartforgex-mermaid-mermaidgitgraphrendering/#method-togitgraphblock-chartforgex-mermaid-mermaidgitgraphdocument-chartforgex-mermaid-mermaidgitgraphrenderoptions) parameter `document`
- Method [MermaidGitGraphRendering.ToPng](/api/chartforgex-mermaid-mermaidgitgraphrendering/#method-topng-chartforgex-mermaid-mermaidgitgraphdocument-chartforgex-mermaid-mermaidgitgraphrenderoptions) parameter `document`
- Method [MermaidGitGraphRendering.ToSvg](/api/chartforgex-mermaid-mermaidgitgraphrendering/#method-tosvg-chartforgex-mermaid-mermaidgitgraphdocument-chartforgex-mermaid-mermaidgitgraphrenderoptions) parameter `document`
- Method [MermaidGitGraphRendering.ToVisualArtifact](/api/chartforgex-mermaid-mermaidgitgraphrendering/#method-tovisualartifact-chartforgex-mermaid-mermaidgitgraphdocument-chartforgex-mermaid-mermaidgitgraphrenderoptions) parameter `document`

 Filter members   

    Show inherited   

 

## Constructors

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

[MermaidGitGraphDocument.cs:12](https://github.com/EvotecIT/ChartForgeX/blob/main/ChartForgeX.Mermaid/MermaidGitGraphDocument.cs#L12)

## 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 List<MermaidRawStatement> Statements { get; }` [#](#property-statements) 

[MermaidGitGraphDocument.cs:12](https://github.com/EvotecIT/ChartForgeX/blob/main/ChartForgeX.Mermaid/MermaidGitGraphDocument.cs#L12)

Gets git graph statements retained in source order.

 `public List<MermaidGitGraphBranch> Branches { get; }` [#](#property-branches) 

[MermaidGitGraphDocument.cs:15](https://github.com/EvotecIT/ChartForgeX/blob/main/ChartForgeX.Mermaid/MermaidGitGraphDocument.cs#L15)

Gets parsed git graph branches.

 `public List<MermaidGitGraphCommit> Commits { get; }` [#](#property-commits) 

[MermaidGitGraphDocument.cs:18](https://github.com/EvotecIT/ChartForgeX/blob/main/ChartForgeX.Mermaid/MermaidGitGraphDocument.cs#L18)

Gets parsed git graph commits.

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

[MermaidGitGraphDocument.cs:21](https://github.com/EvotecIT/ChartForgeX/blob/main/ChartForgeX.Mermaid/MermaidGitGraphDocument.cs#L21)

Gets configuration, theme, or unsupported statements retained for future support.

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

[MermaidGitGraphDocument.cs:24](https://github.com/EvotecIT/ChartForgeX/blob/main/ChartForgeX.Mermaid/MermaidGitGraphDocument.cs#L24)

Gets or sets the diagram orientation token from the header.

## 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 GitGraphBlock ToGitGraphBlock(MermaidGitGraphDocument document, MermaidGitGraphRenderOptions? options = null)` [#](#extension-togitgraphblock-chartforgex-mermaid-mermaidgitgraphdocument-chartforgex-mermaid-mermaidgitgraphrenderoptions) 

[MermaidGitGraphRendering.cs:17](https://github.com/EvotecIT/ChartForgeX/blob/main/ChartForgeX.Mermaid/MermaidGitGraphRendering.cs#L17)

Converts a Mermaid git graph document into a reusable git graph visual block.

Parameters

**document ChartForgeX.Mermaid.MermaidGitGraphDocument required**

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

Returns

 `GitGraphBlock` 

 `public static byte[] ToPng(MermaidGitGraphDocument document, MermaidGitGraphRenderOptions? options = null)` [#](#extension-topng-chartforgex-mermaid-mermaidgitgraphdocument-chartforgex-mermaid-mermaidgitgraphrenderoptions) 

[MermaidGitGraphRendering.cs:83](https://github.com/EvotecIT/ChartForgeX/blob/main/ChartForgeX.Mermaid/MermaidGitGraphRendering.cs#L83)

Renders a Mermaid git graph document to static PNG.

Parameters

**document ChartForgeX.Mermaid.MermaidGitGraphDocument required**

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

Returns

 `byte[]` 

 `public static string ToSvg(MermaidGitGraphDocument document, MermaidGitGraphRenderOptions? options = null)` [#](#extension-tosvg-chartforgex-mermaid-mermaidgitgraphdocument-chartforgex-mermaid-mermaidgitgraphrenderoptions) 

[MermaidGitGraphRendering.cs:79](https://github.com/EvotecIT/ChartForgeX/blob/main/ChartForgeX.Mermaid/MermaidGitGraphRendering.cs#L79)

Renders a Mermaid git graph document to static SVG.

Parameters

**document ChartForgeX.Mermaid.MermaidGitGraphDocument required**

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

Returns

 `string` 

 `public static VisualArtifact ToVisualArtifact(MermaidGitGraphDocument document, MermaidGitGraphRenderOptions? options = null)` [#](#extension-tovisualartifact-chartforgex-mermaid-mermaidgitgraphdocument-chartforgex-mermaid-mermaidgitgraphrenderoptions) 

[MermaidGitGraphRendering.cs:49](https://github.com/EvotecIT/ChartForgeX/blob/main/ChartForgeX.Mermaid/MermaidGitGraphRendering.cs#L49)

Wraps a Mermaid git graph document in a visual artifact envelope backed by a git graph block.

Parameters

**document ChartForgeX.Mermaid.MermaidGitGraphDocument required**

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

Returns

 `VisualArtifact` 

<!-- PowerForge markdown artifact sha256:9EEAACBC93713A49E822AFF0FCEE2DDB9E661B5D76347A36F698DEE5EB135CBA -->
