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

VisualTheme

Namespace ChartForgeX.Themes
Assembly ChartForgeX
Modifiers sealed

A paired immutable theme shared by charts, diagrams and future composition packages.

Inheritance

  • Object
  • VisualTheme

Usage

Explore 6 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.

Accepted by parameters 1

Constructors

public VisualTheme(VisualDesignTokens light, VisualDesignTokens dark, VisualTypography? typography = null, Double spacing = 12, Double seriesStrokeWidth = 2, Double markerRadius = 3, Double areaOpacity = 0.18, Double barRadius = 3, Double gridStrokeWidth = 1, Double axisStrokeWidth = 1, Double cardRadius = 3, Double cardShadowOpacity = 0, ChartColor? cardShadowColor = null, Double gaugeStrokeWidth = 14, Double gaugeBandWidth = 4) #

Creates a paired theme from independent token snapshots and geometry settings.

Parameters

light ChartForgeX.Themes.VisualDesignTokens requiredposition: 0
dark ChartForgeX.Themes.VisualDesignTokens requiredposition: 1
typography ChartForgeX.Themes.VisualTypography? = null optionalposition: 2
spacing System.Double = 12 optionalposition: 3
seriesStrokeWidth System.Double = 2 optionalposition: 4
markerRadius System.Double = 3 optionalposition: 5
areaOpacity System.Double = 0.18 optionalposition: 6
barRadius System.Double = 3 optionalposition: 7
gridStrokeWidth System.Double = 1 optionalposition: 8
axisStrokeWidth System.Double = 1 optionalposition: 9
cardRadius System.Double = 3 optionalposition: 10
cardShadowOpacity System.Double = 0 optionalposition: 11
cardShadowColor ChartForgeX.Primitives.ChartColor? = null optionalposition: 12
gaugeStrokeWidth System.Double = 14 optionalposition: 13
gaugeBandWidth System.Double = 4 optionalposition: 14

Methods

public static VisualTheme FromJson(String json, VisualTypography? typography = null) #
Returns: VisualTheme

Creates a paired theme from the generated HtmlForgeX chart token document.

Parameters

json System.String requiredposition: 0
typography ChartForgeX.Themes.VisualTypography? = null optionalposition: 1
public static VisualTheme FromThemeJson(String json) #
Returns: VisualTheme

Loads a version 1 paired theme, including canonical palettes, typography and geometry.

Parameters

json System.String requiredposition: 0
The case-sensitive versioned theme document, at most one MiB of characters.

Returns

An immutable theme snapshot.

Exceptions

  • ArgumentException – The document is malformed, unsupported, incomplete or outside input limits.
public static VisualTheme Graphite() #
Returns: VisualTheme

Gets the Graphite layout preset with the canonical HtmlForgeX light/dark colors.

public VisualThemeColors Resolve(VisualThemeMode mode) #
Returns: VisualThemeColors

Resolves the selected immutable color snapshot.

Parameters

mode ChartForgeX.Themes.VisualThemeMode requiredposition: 0
public String ToThemeJson() #
Returns: String

Exports the complete paired color, typography and geometry theme using schemaVersion 1.

Returns

A deterministic JSON document suitable for VisualTheme.FromThemeJson.

public VisualTheme WithTypography(VisualTypography typography) #
Returns: VisualTheme

Creates an independent paired theme with the supplied typography and the same colors, geometry and effects.

Parameters

typography ChartForgeX.Themes.VisualTypography requiredposition: 0
The complete font scale to use for the new theme.

Properties

public VisualTypography Typography { get; } #

Gets the typography scale.

public Double Spacing { get; } #

Gets the standard layout gap.

public Double SeriesStrokeWidth { get; } #

Gets the default data-line width.

public Double MarkerRadius { get; } #

Gets the default point radius.

public Double AreaOpacity { get; } #

Gets the area fill opacity.

public Double BarRadius { get; } #

Gets the bar corner radius.

public Double CardRadius { get; } #

Gets the shared outer card corner radius, independent of plot and data mark radii.

public Double CardShadowOpacity { get; } #

Gets the shared card shadow opacity. Zero keeps the default flat surface.

public ChartColor CardShadowColor { get; } #

Gets the shared card shadow color, including its authored alpha.

public Double GridStrokeWidth { get; } #

Gets the guide width.

public Double AxisStrokeWidth { get; } #

Gets the axis width.

public Double GaugeStrokeWidth { get; } #

Gets the gauge track and value stroke width.

public Double GaugeBandWidth { get; } #

Gets the gauge threshold band width.