HtmlForgeX

API Reference

Class

EmailDonutChart

Namespace HtmlForgeX.Email
Assembly HtmlForgeX.Email
Base Element
Implements
Modifiers sealed

A simple email-safe donut chart rendered as a dense table grid (no SVG/canvas). Designed to be robust in Outlook/Gmail while staying dependency-free.

Inheritance

Constructors

Methods

AddSegment 2 overloads
public EmailDonutChart AddSegment(String label, Double value, String color) #
Returns: EmailDonutChart

Creates and adds a segment.

Parameters

label System.String requiredposition: 0
value System.Double requiredposition: 1
color System.String requiredposition: 2
public EmailDonutChart AddSegment(Action<EmailDonutChartSegment> configure) #
Returns: EmailDonutChart

Adds a segment configured via callback.

Parameters

configure System.Action{HtmlForgeX.Email.EmailDonutChartSegment} requiredposition: 0
public override String ToString() #
Returns: String
public EmailDonutChart WithQuality(EmailDonutChartQuality quality) #
Returns: EmailDonutChart

Applies a preset quality level (grid size + cell size).

Parameters

quality HtmlForgeX.Email.EmailDonutChartQuality requiredposition: 0

Properties

public List<EmailDonutChartSegment> Segments { get; } #

Chart segments (label + value + color).

public Int32 GridSize { get; set; } #

Number of grid cells per side. Must be an odd number.

public Int32 CellSizePx { get; set; } #

Pixel size of each grid cell.

public Double HoleRatio { get; set; } #

Hole radius ratio (0..0.9). Higher values create a larger hole.

public String BackgroundColor { get; set; } #

Background color used for the hole and outside the ring (theme-aware by default).

public Boolean ShowLegend { get; set; } #

Whether to render a legend under the chart.

public Int32 LegendColumns { get; set; } #

Number of legend columns (1-3 recommended for email layouts).

public String LegendTextColor { get; set; } #

Legend label text color (theme-aware by default).

public String LegendMutedColor { get; set; } #

Legend meta text color (theme-aware by default).