# MermaidTreemapDocument

Describes a parsed Mermaid treemap diagram.

 Class  

`ChartForgeX.Mermaid`

**Namespace**

`ChartForgeX.Mermaid`

**Assembly**

`ChartForgeX.Mermaid`

**Source**

[MermaidTreemapDocument.cs:11](https://github.com/EvotecIT/ChartForgeX/blob/main/ChartForgeX.Mermaid/MermaidTreemapDocument.cs#L11)

**Base**

`MermaidDocument`

**Modifiers**

sealed

Describes a parsed Mermaid treemap diagram.

## Inheritance

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

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

### Accepted by parameters 8

- Extension method [MermaidTreemapDocument.ToChart](/api/chartforgex-mermaid-mermaidtreemapdocument/#extension-tochart-chartforgex-mermaid-mermaidtreemapdocument-chartforgex-mermaid-mermaidtreemaprenderoptions) parameter `document`
- Extension method [MermaidTreemapDocument.ToPng](/api/chartforgex-mermaid-mermaidtreemapdocument/#extension-topng-chartforgex-mermaid-mermaidtreemapdocument-chartforgex-mermaid-mermaidtreemaprenderoptions) parameter `document`
- Extension method [MermaidTreemapDocument.ToSvg](/api/chartforgex-mermaid-mermaidtreemapdocument/#extension-tosvg-chartforgex-mermaid-mermaidtreemapdocument-chartforgex-mermaid-mermaidtreemaprenderoptions) parameter `document`
- Extension method [MermaidTreemapDocument.ToVisualArtifact](/api/chartforgex-mermaid-mermaidtreemapdocument/#extension-tovisualartifact-chartforgex-mermaid-mermaidtreemapdocument-chartforgex-mermaid-mermaidtreemaprenderoptions) parameter `document`
- Method [MermaidTreemapRendering.ToChart](/api/chartforgex-mermaid-mermaidtreemaprendering/#method-tochart-chartforgex-mermaid-mermaidtreemapdocument-chartforgex-mermaid-mermaidtreemaprenderoptions) parameter `document`
- Method [MermaidTreemapRendering.ToPng](/api/chartforgex-mermaid-mermaidtreemaprendering/#method-topng-chartforgex-mermaid-mermaidtreemapdocument-chartforgex-mermaid-mermaidtreemaprenderoptions) parameter `document`
- Method [MermaidTreemapRendering.ToSvg](/api/chartforgex-mermaid-mermaidtreemaprendering/#method-tosvg-chartforgex-mermaid-mermaidtreemapdocument-chartforgex-mermaid-mermaidtreemaprenderoptions) parameter `document`
- Method [MermaidTreemapRendering.ToVisualArtifact](/api/chartforgex-mermaid-mermaidtreemaprendering/#method-tovisualartifact-chartforgex-mermaid-mermaidtreemapdocument-chartforgex-mermaid-mermaidtreemaprenderoptions) parameter `document`

 Filter members   

    Show inherited   

 

## Constructors

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

[MermaidTreemapDocument.cs:11](https://github.com/EvotecIT/ChartForgeX/blob/main/ChartForgeX.Mermaid/MermaidTreemapDocument.cs#L11)

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

[MermaidTreemapDocument.cs:11](https://github.com/EvotecIT/ChartForgeX/blob/main/ChartForgeX.Mermaid/MermaidTreemapDocument.cs#L11)

Gets retained non-empty treemap statements.

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

[MermaidTreemapDocument.cs:14](https://github.com/EvotecIT/ChartForgeX/blob/main/ChartForgeX.Mermaid/MermaidTreemapDocument.cs#L14)

Gets named native style definitions in source order, including retained unsupported declarations.

 `public List<MermaidTreemapNode> Roots { get; }` [#](#property-roots) 

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

Gets the top-level treemap nodes.

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

[MermaidTreemapDocument.cs:20](https://github.com/EvotecIT/ChartForgeX/blob/main/ChartForgeX.Mermaid/MermaidTreemapDocument.cs#L20)

Gets all treemap nodes 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(MermaidTreemapDocument document, MermaidTreemapRenderOptions? options = null)` [#](#extension-tochart-chartforgex-mermaid-mermaidtreemapdocument-chartforgex-mermaid-mermaidtreemaprenderoptions) 

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

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

Parameters

**document ChartForgeX.Mermaid.MermaidTreemapDocument required**

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

Returns

 `Chart` 

 `public static byte[] ToPng(MermaidTreemapDocument document, MermaidTreemapRenderOptions? options = null)` [#](#extension-topng-chartforgex-mermaid-mermaidtreemapdocument-chartforgex-mermaid-mermaidtreemaprenderoptions) 

[MermaidTreemapRendering.cs:65](https://github.com/EvotecIT/ChartForgeX/blob/main/ChartForgeX.Mermaid/MermaidTreemapRendering.cs#L65)

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

Parameters

**document ChartForgeX.Mermaid.MermaidTreemapDocument required**

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

Returns

 `byte[]` 

 `public static string ToSvg(MermaidTreemapDocument document, MermaidTreemapRenderOptions? options = null)` [#](#extension-tosvg-chartforgex-mermaid-mermaidtreemapdocument-chartforgex-mermaid-mermaidtreemaprenderoptions) 

[MermaidTreemapRendering.cs:59](https://github.com/EvotecIT/ChartForgeX/blob/main/ChartForgeX.Mermaid/MermaidTreemapRendering.cs#L59)

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

Parameters

**document ChartForgeX.Mermaid.MermaidTreemapDocument required**

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

Returns

 `string` 

 `public static VisualArtifact ToVisualArtifact(MermaidTreemapDocument document, MermaidTreemapRenderOptions? options = null)` [#](#extension-tovisualartifact-chartforgex-mermaid-mermaidtreemapdocument-chartforgex-mermaid-mermaidtreemaprenderoptions) 

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

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

Parameters

**document ChartForgeX.Mermaid.MermaidTreemapDocument required**

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

Returns

 `VisualArtifact` 

<!-- PowerForge markdown artifact sha256:26E4C37F760DC0F9C526FDFE7B2AEC1C8165AC78FD6C91E6604437072852F78F -->
