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

VisualArtifact

Namespace ChartForgeX.VisualArtifacts
Assembly ChartForgeX
Modifiers sealed

Describes one product-neutral visual artifact that can be rendered, inspected, exported, or handed to a host adapter.

Inheritance

  • Object
  • VisualArtifact

Usage

Explore 109 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 81

Accepted by parameters 28

Constructors

public VisualArtifact() #

Methods

public VisualArtifact Clone() #
Returns: VisualArtifact

Copies the artifact's host envelope independently of its semantic model and static presentation.

Returns

A new artifact with independent metadata, accessibility, regions, and legend items.

public static VisualArtifact Create(String id, VisualArtifactKind kind, Object model) #
Returns: VisualArtifact

Creates a visual artifact envelope for a model.

Parameters

id System.String requiredposition: 0
kind ChartForgeX.VisualArtifacts.VisualArtifactKind requiredposition: 1
model System.Object requiredposition: 2
public Boolean SupportsExport(VisualArtifactExportFormat format) #
Returns: Boolean

Returns true when the artifact declares support for the requested export format.

Parameters

format ChartForgeX.VisualArtifacts.VisualArtifactExportFormat requiredposition: 0

Properties

public String Id { get; set; } #

Gets or sets a stable artifact identifier.

public VisualArtifactKind Kind { get; set; } #

Gets or sets the artifact kind.

public VisualArtifactSourceLanguage SourceLanguage { get; set; } #

Gets or sets the source language used to author the artifact.

public String Title { get; set; } #

Gets or sets the artifact title.

public String Subtitle { get; set; } #

Gets or sets the artifact subtitle.

public Object? Model { get; set; } #

Gets or sets the renderer-independent artifact model.

public IStaticVisualSource? RenderSource { get; set; } #

Gets or sets a producer-owned static presentation, independently of the semantic model.

public VisualArtifactExportFormat ExportFormats { get; set; } #

Gets or sets the static export formats supported by this artifact.

public VisualArtifactSize? NaturalSize { get; set; } #

Gets or sets the artifact's natural size in pixels when known.

public Boolean PreserveNaturalSize { get; set; } #

Gets or sets a value indicating whether exporters must preserve VisualArtifact.NaturalSize when a renderer prepares content on a larger internal canvas.

public Dictionary<String, String> Metadata { get; } #

Gets artifact metadata for host adapters and exporters.

public VisualAccessibility Accessibility { get; } #

Gets renderer-independent accessibility metadata for host adapters and capable exporters.

public List<VisualArtifactRegion> Regions { get; } #

Gets host-inspectable visual regions.

public List<VisualArtifactLegendItem> Legend { get; } #

Gets legend items associated with the artifact.

Extension Methods

SaveHtml 2 overloads
public static Void SaveHtml(VisualArtifact artifact, String path) #
Returns: Void

Saves a supported visual artifact model to a standalone HTML page.

Parameters

artifact ChartForgeX.VisualArtifacts.VisualArtifact requiredposition: 0
The artifact envelope.
path System.String requiredposition: 1
The target HTML path.
public static Void SaveHtml(VisualArtifact artifact, String path, VisualArtifactRenderOptions? options) #
Returns: Void

Saves a supported visual artifact model to standalone HTML with artifact-wide options.

Parameters

artifact ChartForgeX.VisualArtifacts.VisualArtifact requiredposition: 0
path System.String requiredposition: 1
options ChartForgeX.VisualArtifacts.VisualArtifactRenderOptions? requiredposition: 2
SavePng 2 overloads
public static Void SavePng(VisualArtifact artifact, String path) #
Returns: Void

Saves a supported visual artifact model to PNG.

Parameters

artifact ChartForgeX.VisualArtifacts.VisualArtifact requiredposition: 0
The artifact envelope.
path System.String requiredposition: 1
The target PNG path.
public static Void SavePng(VisualArtifact artifact, String path, VisualArtifactRenderOptions? options) #
Returns: Void

Saves a supported visual artifact model to PNG with artifact-wide options.

Parameters

artifact ChartForgeX.VisualArtifacts.VisualArtifact requiredposition: 0
path System.String requiredposition: 1
options ChartForgeX.VisualArtifacts.VisualArtifactRenderOptions? requiredposition: 2
SaveSvg 2 overloads
public static Void SaveSvg(VisualArtifact artifact, String path) #
Returns: Void

Saves a supported visual artifact model to SVG.

Parameters

artifact ChartForgeX.VisualArtifacts.VisualArtifact requiredposition: 0
The artifact envelope.
path System.String requiredposition: 1
The target SVG path.
public static Void SaveSvg(VisualArtifact artifact, String path, VisualArtifactRenderOptions? options) #
Returns: Void

Saves a supported visual artifact model to SVG with artifact-wide options.

Parameters

artifact ChartForgeX.VisualArtifacts.VisualArtifact requiredposition: 0
path System.String requiredposition: 1
options ChartForgeX.VisualArtifacts.VisualArtifactRenderOptions? requiredposition: 2
ToHtmlPage 2 overloads
public static String ToHtmlPage(VisualArtifact artifact) #
Returns: String

Renders a supported visual artifact model to a standalone HTML page.

Parameters

artifact ChartForgeX.VisualArtifacts.VisualArtifact requiredposition: 0
The artifact envelope.

Returns

HTML markup.

public static String ToHtmlPage(VisualArtifact artifact, VisualArtifactRenderOptions? options) #
Returns: String

Renders a supported visual artifact model to a standalone HTML page with artifact-wide options.

Parameters

artifact ChartForgeX.VisualArtifacts.VisualArtifact requiredposition: 0
options ChartForgeX.VisualArtifacts.VisualArtifactRenderOptions? requiredposition: 1
public static VisualArtifactInterchangeEnvelope ToInterchangeEnvelope(VisualArtifact artifact, VisualArtifactRenderOptions? renderOptions = null) #
Returns: VisualArtifactInterchangeEnvelope

Creates a versioned semantic interchange envelope for an artifact.

Parameters

artifact ChartForgeX.VisualArtifacts.VisualArtifact requiredposition: 0
The artifact to project.
renderOptions ChartForgeX.VisualArtifacts.VisualArtifactRenderOptions? = null optionalposition: 1
Optional topology preparation options used to capture deterministic coordinates.

Returns

A portable semantic envelope. Unsupported visual kinds retain common metadata and use their separately rendered SVG fallback.

public static String ToInterchangeJson(VisualArtifact artifact, VisualArtifactRenderOptions? renderOptions = null) #
Returns: String

Serializes an artifact's semantic interchange envelope to deterministic JSON.

Parameters

artifact ChartForgeX.VisualArtifacts.VisualArtifact requiredposition: 0
renderOptions ChartForgeX.VisualArtifacts.VisualArtifactRenderOptions? = null optionalposition: 1
public static Byte[] ToInterchangeUtf8Json(VisualArtifact artifact, VisualArtifactRenderOptions? renderOptions = null) #
Returns: Byte[]

Serializes an artifact's semantic interchange envelope to deterministic UTF-8 JSON bytes.

Parameters

artifact ChartForgeX.VisualArtifacts.VisualArtifact requiredposition: 0
renderOptions ChartForgeX.VisualArtifacts.VisualArtifactRenderOptions? = null optionalposition: 1
ToPng 2 overloads
public static Byte[] ToPng(VisualArtifact artifact) #
Returns: Byte[]

Renders a supported visual artifact model to PNG.

Parameters

artifact ChartForgeX.VisualArtifacts.VisualArtifact requiredposition: 0
The artifact envelope.

Returns

PNG bytes.

public static Byte[] ToPng(VisualArtifact artifact, VisualArtifactRenderOptions? options) #
Returns: Byte[]

Renders a supported visual artifact model to PNG with artifact-wide options.

Parameters

artifact ChartForgeX.VisualArtifacts.VisualArtifact requiredposition: 0
options ChartForgeX.VisualArtifacts.VisualArtifactRenderOptions? requiredposition: 1
public static RgbaImage ToRgbaImage(VisualArtifact artifact, VisualArtifactRenderOptions? options = null) #
Returns: RgbaImage

Renders an artifact directly to native pixels, before format encoding.

Parameters

artifact ChartForgeX.VisualArtifacts.VisualArtifact requiredposition: 0
The source semantics and optional static presentation.
options ChartForgeX.VisualArtifacts.VisualArtifactRenderOptions? = null optionalposition: 1
Optional core rendering options. Raster encoding options apply when encoding the result.

Returns

A detached RGBA image at the producer's configured output density.

ToSvg 3 overloads
public static String ToSvg(VisualArtifact artifact) #
Returns: String

Renders a supported visual artifact model to SVG.

Parameters

artifact ChartForgeX.VisualArtifacts.VisualArtifact requiredposition: 0
The artifact envelope.

Returns

SVG markup.

public static String ToSvg(VisualArtifact artifact, VisualArtifactRenderOptions? options) #
Returns: String

Renders a supported visual artifact model to SVG with artifact-wide options.

Parameters

artifact ChartForgeX.VisualArtifacts.VisualArtifact requiredposition: 0
options ChartForgeX.VisualArtifacts.VisualArtifactRenderOptions? requiredposition: 1
public static String ToSvg(VisualArtifact artifact, VisualArtifactRenderOptions? options, String idScope) #
Returns: String

Renders SVG with a caller-owned namespace for embedding several artifacts in one document.

Parameters

artifact ChartForgeX.VisualArtifacts.VisualArtifact requiredposition: 0
options ChartForgeX.VisualArtifacts.VisualArtifactRenderOptions? requiredposition: 1
idScope System.String requiredposition: 2
ToWatermarkedArtifact 2 overloads
public static VisualArtifact ToWatermarkedArtifact(VisualArtifact artifact, params VisualWatermark[] watermarks) #
Returns: VisualArtifact

Creates a detached artifact envelope with watermark presentation in declaration order.

Parameters

artifact ChartForgeX.VisualArtifacts.VisualArtifact requiredposition: 0
watermarks ChartForgeX.VisualArtifacts.VisualWatermark[] requiredposition: 1
public static VisualArtifact ToWatermarkedArtifact(VisualArtifact artifact, VisualArtifactRenderOptions? renderOptions, params VisualWatermark[] watermarks) #
Returns: VisualArtifact

Creates a detached watermarked artifact with static presentation resolved using the supplied core options.

Parameters

artifact ChartForgeX.VisualArtifacts.VisualArtifact requiredposition: 0
renderOptions ChartForgeX.VisualArtifacts.VisualArtifactRenderOptions? requiredposition: 1
watermarks ChartForgeX.VisualArtifacts.VisualWatermark[] requiredposition: 2
public static String ToWatermarkedHtmlPage(VisualArtifact artifact, String renderedSvg, params VisualWatermark[] watermarks) #
Returns: String

Wraps trusted, already-rendered SVG with watermarks in a standalone HTML page.

Parameters

artifact ChartForgeX.VisualArtifacts.VisualArtifact requiredposition: 0
The unchanged host envelope supplying the title, language, and natural-size fallback.
renderedSvg System.String requiredposition: 1
A complete trusted SVG document supplied by a static or animated renderer.
watermarks ChartForgeX.VisualArtifacts.VisualWatermark[] requiredposition: 2
Watermarks captured in declaration order.

Returns

A standalone page containing the decorated SVG and the artifact's host title and language.

public static String ToWatermarkedSvg(VisualArtifact artifact, String renderedSvg, params VisualWatermark[] watermarks) #
Returns: String

Appends watermark layers to trusted, already-rendered SVG without resolving the artifact's model.

Parameters

artifact ChartForgeX.VisualArtifacts.VisualArtifact requiredposition: 0
The unchanged host envelope; its natural size is a fallback when SVG dimensions are absent.
renderedSvg System.String requiredposition: 1
A complete trusted SVG document supplied by a static or animated renderer.
watermarks ChartForgeX.VisualArtifacts.VisualWatermark[] requiredposition: 2
Watermarks captured in declaration order.

Returns

The supplied markup with watermark layers inserted before its closing SVG element.

WithWatermarks 2 overloads
public static VisualArtifact WithWatermarks(VisualArtifact artifact, params VisualWatermark[] watermarks) #
Returns: VisualArtifact

Appends a snapshot of the supplied watermarks in declaration order.

Parameters

artifact ChartForgeX.VisualArtifacts.VisualArtifact requiredposition: 0
watermarks ChartForgeX.VisualArtifacts.VisualWatermark[] requiredposition: 1
public static VisualArtifact WithWatermarks(VisualArtifact artifact, VisualArtifactRenderOptions? renderOptions, params VisualWatermark[] watermarks) #
Returns: VisualArtifact

Appends watermark presentation over a static source resolved with the supplied core options.

Parameters

artifact ChartForgeX.VisualArtifacts.VisualArtifact requiredposition: 0
renderOptions ChartForgeX.VisualArtifacts.VisualArtifactRenderOptions? requiredposition: 1
watermarks ChartForgeX.VisualArtifacts.VisualWatermark[] requiredposition: 2