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

SegmentedMetricBlock

Namespace ChartForgeX.VisualBlocks
Assembly ChartForgeX.Visuals
Base FactualVisualBlock<SegmentedMetricBlock>
Implements
IVisualBlock IStaticVisualSource IFactualVisualPixels
Modifiers sealed

A generic segmented metric block for progress rows, part-to-whole strips, and distribution rows.

Inheritance

  • FactualVisualBlock<SegmentedMetricBlock>
  • SegmentedMetricBlock

Usage

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

Constructors

public SegmentedMetricBlock() #

Methods

AddItem 3 overloads
public SegmentedMetricBlock AddItem(String label, Double value, Double maximum = 100, Int32 segments = 40, ChartColor? color = null, VisualStatus status = None, ChartFillPattern pattern = None, String? delta = null, String? symbol = null, Object? displayValue = null, String? displayFormat = null) #
Returns: SegmentedMetricBlock

Adds a generic segmented metric item.

Parameters

label System.String requiredposition: 0
value System.Double requiredposition: 1
maximum System.Double = 100 optionalposition: 2
segments System.Int32 = 40 optionalposition: 3
color ChartForgeX.Primitives.ChartColor? = null optionalposition: 4
status ChartForgeX.VisualBlocks.VisualStatus = None optionalposition: 5
pattern ChartForgeX.Core.ChartFillPattern = None optionalposition: 6
delta System.String? = null optionalposition: 7
symbol System.String? = null optionalposition: 8
displayValue System.Object? = null optionalposition: 9
displayFormat System.String? = null optionalposition: 10
public SegmentedMetricBlock AddItem(SegmentedMetricItem item) #
Returns: SegmentedMetricBlock

Adds a preconfigured segmented metric item.

Parameters

item ChartForgeX.VisualBlocks.SegmentedMetricItem requiredposition: 0
public SegmentedMetricBlock AddItem(String label, Double value, Action<SegmentedMetricItem> configure) #
Returns: SegmentedMetricBlock

Adds a segmented metric item and configures it with a callback.

Parameters

label System.String requiredposition: 0
value System.Double requiredposition: 1
configure System.Action<ChartForgeX.VisualBlocks.SegmentedMetricItem> requiredposition: 2
public static SegmentedMetricBlock Create(SegmentedMetricStyle style = ProgressRows) #
Returns: SegmentedMetricBlock

Creates a new segmented metric block.

Parameters

style ChartForgeX.VisualBlocks.SegmentedMetricStyle = ProgressRows optionalposition: 0
public SegmentedMetricBlock WithCaption(String caption) #
Returns: SegmentedMetricBlock

Sets optional caption text.

Parameters

caption System.String requiredposition: 0
public SegmentedMetricBlock WithHeaderSymbol(String symbol) #
Returns: SegmentedMetricBlock

Sets optional compact header symbol rendered in a badge.

Parameters

symbol System.String requiredposition: 0
public SegmentedMetricBlock WithMetric(String label, Object? value, String? unit = null, String? caption = null, String? format = null) #
Returns: SegmentedMetricBlock

Sets the card metric label and value.

Parameters

label System.String requiredposition: 0
value System.Object? requiredposition: 1
unit System.String? = null optionalposition: 2
caption System.String? = null optionalposition: 3
format System.String? = null optionalposition: 4
public SegmentedMetricBlock WithStyle(SegmentedMetricStyle style) #
Returns: SegmentedMetricBlock

Sets the segmented metric visual treatment.

Parameters

style ChartForgeX.VisualBlocks.SegmentedMetricStyle requiredposition: 0

Properties

public SegmentedMetricStyle Style { get; set; } #

Gets or sets the visual treatment used for the items.

public IReadOnlyList<SegmentedMetricItem> Items { get; } #

Gets metric items.

public String Label { get; set; } #

Gets the metric label.

public String Value { get; set; } #

Gets the metric value.

public String Unit { get; set; } #

Gets the unit suffix rendered beside item values for composition-style blocks.

public String Caption { get; set; } #

Gets optional caption text rendered beside the metric.

public String HeaderSymbol { get; set; } #

Gets optional compact header symbol rendered in a badge.