# MermaidXYChartDocument

Describes a parsed Mermaid XY chart document.

 Class  

`ChartForgeX.Mermaid`

**Namespace**

`ChartForgeX.Mermaid`

**Assembly**

`ChartForgeX.Mermaid`

**Source**

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

**Base**

`MermaidDocument`

**Modifiers**

sealed

Describes a parsed Mermaid XY chart document.

## Inheritance

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

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

### Accepted by parameters 8

- Extension method [MermaidXYChartDocument.ToChart](/api/chartforgex-mermaid-mermaidxychartdocument/#extension-tochart-chartforgex-mermaid-mermaidxychartdocument-chartforgex-mermaid-mermaidxychartrenderoptions) parameter `document`
- Extension method [MermaidXYChartDocument.ToPng](/api/chartforgex-mermaid-mermaidxychartdocument/#extension-topng-chartforgex-mermaid-mermaidxychartdocument-chartforgex-mermaid-mermaidxychartrenderoptions) parameter `document`
- Extension method [MermaidXYChartDocument.ToSvg](/api/chartforgex-mermaid-mermaidxychartdocument/#extension-tosvg-chartforgex-mermaid-mermaidxychartdocument-chartforgex-mermaid-mermaidxychartrenderoptions) parameter `document`
- Extension method [MermaidXYChartDocument.ToVisualArtifact](/api/chartforgex-mermaid-mermaidxychartdocument/#extension-tovisualartifact-chartforgex-mermaid-mermaidxychartdocument-chartforgex-mermaid-mermaidxychartrenderoptions) parameter `document`
- Method [MermaidXYChartRendering.ToChart](/api/chartforgex-mermaid-mermaidxychartrendering/#method-tochart-chartforgex-mermaid-mermaidxychartdocument-chartforgex-mermaid-mermaidxychartrenderoptions) parameter `document`
- Method [MermaidXYChartRendering.ToPng](/api/chartforgex-mermaid-mermaidxychartrendering/#method-topng-chartforgex-mermaid-mermaidxychartdocument-chartforgex-mermaid-mermaidxychartrenderoptions) parameter `document`
- Method [MermaidXYChartRendering.ToSvg](/api/chartforgex-mermaid-mermaidxychartrendering/#method-tosvg-chartforgex-mermaid-mermaidxychartdocument-chartforgex-mermaid-mermaidxychartrenderoptions) parameter `document`
- Method [MermaidXYChartRendering.ToVisualArtifact](/api/chartforgex-mermaid-mermaidxychartrendering/#method-tovisualartifact-chartforgex-mermaid-mermaidxychartdocument-chartforgex-mermaid-mermaidxychartrenderoptions) parameter `document`

 Filter members   

    Show inherited   

 

## Constructors

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

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

## 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) 

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

Gets retained raw body statements.

 `public ChartOrientation Orientation { get; set; }` [#](#property-orientation) 

[MermaidXYChartDocument.cs:26](https://github.com/EvotecIT/ChartForgeX/blob/main/ChartForgeX.Mermaid/MermaidXYChartDocument.cs#L26)

Gets or sets the requested chart orientation.

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

[MermaidXYChartDocument.cs:33](https://github.com/EvotecIT/ChartForgeX/blob/main/ChartForgeX.Mermaid/MermaidXYChartDocument.cs#L33)

Gets or sets the optional chart title.

 `public MermaidXYChartAxis XAxis { get; }` [#](#property-xaxis) 

[MermaidXYChartDocument.cs:36](https://github.com/EvotecIT/ChartForgeX/blob/main/ChartForgeX.Mermaid/MermaidXYChartDocument.cs#L36)

Gets the optional x-axis declaration.

 `public MermaidXYChartAxis YAxis { get; }` [#](#property-yaxis) 

[MermaidXYChartDocument.cs:39](https://github.com/EvotecIT/ChartForgeX/blob/main/ChartForgeX.Mermaid/MermaidXYChartDocument.cs#L39)

Gets the optional y-axis declaration.

 `public List<MermaidXYChartSeries> Series { get; }` [#](#property-series) 

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

Gets parsed bar and line series in source order.

## 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 Chart ToChart(MermaidXYChartDocument document, MermaidXYChartRenderOptions? options = null)` [#](#extension-tochart-chartforgex-mermaid-mermaidxychartdocument-chartforgex-mermaid-mermaidxychartrenderoptions) 

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

Converts a Mermaid XY chart document into a renderer-independent ChartForgeX chart.

Parameters

**document ChartForgeX.Mermaid.MermaidXYChartDocument required**

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

Returns

 `Chart` 

 `public static byte[] ToPng(MermaidXYChartDocument document, MermaidXYChartRenderOptions? options = null)` [#](#extension-topng-chartforgex-mermaid-mermaidxychartdocument-chartforgex-mermaid-mermaidxychartrenderoptions) 

[MermaidXYChartRendering.cs:89](https://github.com/EvotecIT/ChartForgeX/blob/main/ChartForgeX.Mermaid/MermaidXYChartRendering.cs#L89)

Renders a Mermaid XY chart document to static PNG through ChartForgeX chart rendering.

Parameters

**document ChartForgeX.Mermaid.MermaidXYChartDocument required**

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

Returns

 `byte[]` 

 `public static string ToSvg(MermaidXYChartDocument document, MermaidXYChartRenderOptions? options = null)` [#](#extension-tosvg-chartforgex-mermaid-mermaidxychartdocument-chartforgex-mermaid-mermaidxychartrenderoptions) 

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

Renders a Mermaid XY chart document to static SVG through ChartForgeX chart rendering.

Parameters

**document ChartForgeX.Mermaid.MermaidXYChartDocument required**

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

Returns

 `string` 

 `public static VisualArtifact ToVisualArtifact(MermaidXYChartDocument document, MermaidXYChartRenderOptions? options = null)` [#](#extension-tovisualartifact-chartforgex-mermaid-mermaidxychartdocument-chartforgex-mermaid-mermaidxychartrenderoptions) 

[MermaidXYChartRendering.cs:60](https://github.com/EvotecIT/ChartForgeX/blob/main/ChartForgeX.Mermaid/MermaidXYChartRendering.cs#L60)

Wraps a Mermaid XY chart document in a visual artifact envelope backed by a ChartForgeX chart.

Parameters

**document ChartForgeX.Mermaid.MermaidXYChartDocument required**

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

Returns

 `VisualArtifact` 

<!-- PowerForge markdown artifact sha256:7E7DFED698F00C4DA18539BCF34C03A7E33F25CD6C4613C2C358F6FE95D88182 -->
