Project

ChartForgeX

Render deterministic charts, dashboards, topology, hierarchy, and report visuals directly from .NET.

Stars 47
Forks 2
NuGet downloads 75,067
Release ChartForgeX-v2.0.0
Language: HTML Updated: 2026-10-12

API Reference

Class

MermaidC4Document

Namespace ChartForgeX.Mermaid
Assembly ChartForgeX.Mermaid
Modifiers sealed

Describes a parsed Mermaid C4 diagram.

Inheritance

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

Accepted by parameters 8

Constructors

public MermaidC4Document() #

Properties

public String DiagramType { get; set; } #

Gets or sets the concrete C4 header token such as C4Context.

public String? Title { get; set; } #

Gets or sets the optional Mermaid title statement.

public String? Direction { get; set; } #

Gets or sets an optional Mermaid direction statement.

public List<MermaidRawStatement> Statements { get; } #

Gets raw C4 statements retained with source spans.

public List<MermaidC4Boundary> Boundaries { get; } #

Gets parsed C4 boundaries and deployment nodes in source order.

public List<MermaidC4Element> Elements { get; } #

Gets parsed C4 elements in source order.

public List<MermaidC4Relationship> Relationships { get; } #

Gets parsed C4 relationships in source order.

public List<MermaidRawStatement> RetainedStatements { get; } #

Gets retained C4 statements whose semantics are not rendered exactly yet.

Extension Methods

public static Byte[] ToPng(MermaidC4Document document, MermaidTopologyRenderOptions? options = null) #
Returns: Byte[]

Renders a Mermaid C4 document to static PNG.

Parameters

document ChartForgeX.Mermaid.MermaidC4Document requiredposition: 0
options ChartForgeX.Mermaid.MermaidTopologyRenderOptions? = null optionalposition: 1
public static String ToSvg(MermaidC4Document document, MermaidTopologyRenderOptions? options = null) #
Returns: String

Renders a Mermaid C4 document to static SVG.

Parameters

document ChartForgeX.Mermaid.MermaidC4Document requiredposition: 0
options ChartForgeX.Mermaid.MermaidTopologyRenderOptions? = null optionalposition: 1
public static TopologyChart ToTopologyChart(MermaidC4Document document, MermaidTopologyRenderOptions? options = null) #
Returns: TopologyChart

Converts a Mermaid C4 document into a renderer-independent ChartForgeX topology chart.

Parameters

document ChartForgeX.Mermaid.MermaidC4Document requiredposition: 0
options ChartForgeX.Mermaid.MermaidTopologyRenderOptions? = null optionalposition: 1
public static VisualArtifact ToVisualArtifact(MermaidC4Document document, MermaidTopologyRenderOptions? options = null) #
Returns: VisualArtifact

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

Parameters

document ChartForgeX.Mermaid.MermaidC4Document requiredposition: 0
options ChartForgeX.Mermaid.MermaidTopologyRenderOptions? = null optionalposition: 1