Skip to content
ChartForgeX
Class

SegmentedMetricBlock

ChartForgeX.VisualBlocks

Namespace
ChartForgeX.VisualBlocks
Assembly
ChartForgeX.Visuals
Implements
IVisualBlock IStaticVisualSource IFactualVisualPixels
Modifiers
sealed
Attributes
Fluent

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

Inheritance

Usage

Explore 82 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 44

Accepted by parameters 38

Constructors

public SegmentedMetricBlock() #

Methods

AddItem 3 overloads
public SegmentedMetricBlock AddItem(string label, double value, double maximum = 100, int segments = 40, ChartColor? color = null, Tone tone = default, ChartFillPattern pattern = None, string? delta = null, string? symbol = null, object? displayValue = null, string? displayFormat = null) #

Adds a generic segmented metric item.

Parameters

label string required
value double required
maximum double = 100 optional
segments int = 40 optional
color ChartForgeX.Primitives.ChartColor? = null optional
tone ChartForgeX.Tone = default optional
pattern ChartForgeX.Core.ChartFillPattern = None optional
delta string? = null optional
symbol string? = null optional
displayValue object? = null optional
displayFormat string? = null optional
public SegmentedMetricBlock AddItem(SegmentedMetricItem item) #

Adds a preconfigured segmented metric item.

Parameters

item ChartForgeX.VisualBlocks.SegmentedMetricItem required
public SegmentedMetricBlock AddItem(string label, double value, Action<SegmentedMetricItem> configure) #

Adds an independent segmented metric item after successful configuration.

Parameters

label string required
value double required
configure System.Action<ChartForgeX.VisualBlocks.SegmentedMetricItem> required
public static SegmentedMetricBlock Create(SegmentedMetricStyle style = ProgressRows) #

Creates a new segmented metric block.

Parameters

style ChartForgeX.VisualBlocks.SegmentedMetricStyle = ProgressRows optional
public SegmentedMetricBlock Metric(string label, object? value, string? unit = null, string? caption = null, string? format = null) #

Sets the card metric label and value.

Parameters

label string required
value object? required
unit string? = null optional
caption string? = null optional
format string? = null optional

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.

Extension Methods

public static SegmentedMetricBlock Accessibility(SegmentedMetricBlock segmentedMetricBlock, Action<VisualAccessibility> configure) #

Configures VisualBlockOptions.Accessibility in place.

Parameters

segmentedMetricBlock ChartForgeX.VisualBlocks.SegmentedMetricBlock required
The instance.
configure System.Action<ChartForgeX.Accessibility.VisualAccessibility> required
Configures the value.

Returns

SegmentedMetricBlock The same instance.
public static SegmentedMetricBlock Caption(SegmentedMetricBlock segmentedMetricBlock, string value) #

Sets SegmentedMetricBlock.Caption: Gets optional caption text rendered beside the metric.

Parameters

segmentedMetricBlock ChartForgeX.VisualBlocks.SegmentedMetricBlock required
The instance.
value string required
The value.

Returns

SegmentedMetricBlock The same instance.

Examples

// C# initializer or property                                                     // C# fluent
new global::ChartForgeX.VisualBlocks.SegmentedMetricBlock { Caption = value };    segmentedMetricBlock.Caption(value);
public static SegmentedMetricBlock HeaderSymbol(SegmentedMetricBlock segmentedMetricBlock, string value) #

Sets SegmentedMetricBlock.HeaderSymbol: Gets optional compact header symbol rendered in a badge.

Parameters

segmentedMetricBlock ChartForgeX.VisualBlocks.SegmentedMetricBlock required
The instance.
value string required
The value.

Returns

SegmentedMetricBlock The same instance.

Examples

// C# initializer or property                                                          // C# fluent
new global::ChartForgeX.VisualBlocks.SegmentedMetricBlock { HeaderSymbol = value };    segmentedMetricBlock.HeaderSymbol(value);
public static SegmentedMetricBlock HostOwnsFrame(SegmentedMetricBlock segmentedMetricBlock, bool value = true) #

Sets VisualBlockOptions.HostOwnsFrame.

Parameters

segmentedMetricBlock ChartForgeX.VisualBlocks.SegmentedMetricBlock required
The instance.
value bool = true optional
The value; true when omitted.

Returns

SegmentedMetricBlock The same instance.

Examples

// C# initializer or property                                                                                                                                 // C# fluent
((global::ChartForgeX.VisualBlocks.VisualBlock<global::ChartForgeX.VisualBlocks.SegmentedMetricBlock>)segmentedMetricBlock).Options.HostOwnsFrame = value;    segmentedMetricBlock.HostOwnsFrame(value);
public static SegmentedMetricBlock Label(SegmentedMetricBlock segmentedMetricBlock, string value) #

Sets SegmentedMetricBlock.Label: Gets the metric label.

Parameters

segmentedMetricBlock ChartForgeX.VisualBlocks.SegmentedMetricBlock required
The instance.
value string required
The value.

Returns

SegmentedMetricBlock The same instance.

Examples

// C# initializer or property                                                   // C# fluent
new global::ChartForgeX.VisualBlocks.SegmentedMetricBlock { Label = value };    segmentedMetricBlock.Label(value);
public static SegmentedMetricBlock Options(SegmentedMetricBlock segmentedMetricBlock, Action<VisualBlockOptions> configure) #

Configures VisualBlock<SegmentedMetricBlock>.Options in place.

Parameters

segmentedMetricBlock ChartForgeX.VisualBlocks.SegmentedMetricBlock required
The instance.
configure System.Action<ChartForgeX.VisualBlocks.VisualBlockOptions> required
Configures the value.

Returns

SegmentedMetricBlock The same instance.
public static SegmentedMetricBlock Padding(SegmentedMetricBlock segmentedMetricBlock, ChartPadding value) #

Sets VisualBlockOptions.Padding.

Parameters

segmentedMetricBlock ChartForgeX.VisualBlocks.SegmentedMetricBlock required
The instance.
value ChartForgeX.Primitives.ChartPadding required
The value.

Returns

SegmentedMetricBlock The same instance.

Examples

// C# initializer or property                                                                                                                           // C# fluent
((global::ChartForgeX.VisualBlocks.VisualBlock<global::ChartForgeX.VisualBlocks.SegmentedMetricBlock>)segmentedMetricBlock).Options.Padding = value;    segmentedMetricBlock.Padding(value);
public static SegmentedMetricBlock RasterScale(SegmentedMetricBlock segmentedMetricBlock, int value) #

Sets VisualBlockOptions.RasterScale.

Parameters

segmentedMetricBlock ChartForgeX.VisualBlocks.SegmentedMetricBlock required
The instance.
value int required
The value.

Returns

SegmentedMetricBlock The same instance.

Examples

// C# initializer or property                                                                                                                               // C# fluent
((global::ChartForgeX.VisualBlocks.VisualBlock<global::ChartForgeX.VisualBlocks.SegmentedMetricBlock>)segmentedMetricBlock).Options.RasterScale = value;    segmentedMetricBlock.RasterScale(value);
public static SegmentedMetricBlock ShowCard(SegmentedMetricBlock segmentedMetricBlock, bool value = true) #

Sets VisualBlockOptions.ShowCard.

Parameters

segmentedMetricBlock ChartForgeX.VisualBlocks.SegmentedMetricBlock required
The instance.
value bool = true optional
The value; true when omitted.

Returns

SegmentedMetricBlock The same instance.

Examples

// C# initializer or property                                                                                                                            // C# fluent
((global::ChartForgeX.VisualBlocks.VisualBlock<global::ChartForgeX.VisualBlocks.SegmentedMetricBlock>)segmentedMetricBlock).Options.ShowCard = value;    segmentedMetricBlock.ShowCard(value);
public static SegmentedMetricBlock Size(SegmentedMetricBlock segmentedMetricBlock, ChartSize value) #

Sets VisualBlockOptions.Size.

Parameters

segmentedMetricBlock ChartForgeX.VisualBlocks.SegmentedMetricBlock required
The instance.
value ChartForgeX.Primitives.ChartSize required
The value.

Returns

SegmentedMetricBlock The same instance.

Examples

// C# initializer or property                                                                                                                        // C# fluent
((global::ChartForgeX.VisualBlocks.VisualBlock<global::ChartForgeX.VisualBlocks.SegmentedMetricBlock>)segmentedMetricBlock).Options.Size = value;    segmentedMetricBlock.Size(value);
public static SegmentedMetricBlock Style(SegmentedMetricBlock segmentedMetricBlock, SegmentedMetricStyle value) #

Sets SegmentedMetricBlock.Style: Gets or sets the visual treatment used for the items.

Parameters

segmentedMetricBlock ChartForgeX.VisualBlocks.SegmentedMetricBlock required
The instance.
value ChartForgeX.VisualBlocks.SegmentedMetricStyle required
The value.

Returns

SegmentedMetricBlock The same instance.

Examples

// C# initializer or property                                                   // C# fluent
new global::ChartForgeX.VisualBlocks.SegmentedMetricBlock { Style = value };    segmentedMetricBlock.Style(value);
public static SegmentedMetricBlock Subtitle(SegmentedMetricBlock segmentedMetricBlock, string value) #

Sets VisualBlock<SegmentedMetricBlock>.Subtitle.

Parameters

segmentedMetricBlock ChartForgeX.VisualBlocks.SegmentedMetricBlock required
The instance.
value string required
The value.

Returns

SegmentedMetricBlock The same instance.

Examples

// C# initializer or property                                                      // C# fluent
new global::ChartForgeX.VisualBlocks.SegmentedMetricBlock { Subtitle = value };    segmentedMetricBlock.Subtitle(value);
public static SegmentedMetricBlock SvgColorVariables(SegmentedMetricBlock segmentedMetricBlock, SvgColorVariables? value) #

Sets VisualBlockOptions.SvgColorVariables.

Parameters

segmentedMetricBlock ChartForgeX.VisualBlocks.SegmentedMetricBlock required
The instance.
value ChartForgeX.Themes.SvgColorVariables? required
The value.

Returns

SegmentedMetricBlock The same instance.

Examples

// C# initializer or property                                                                                                                                     // C# fluent
((global::ChartForgeX.VisualBlocks.VisualBlock<global::ChartForgeX.VisualBlocks.SegmentedMetricBlock>)segmentedMetricBlock).Options.SvgColorVariables = value;    segmentedMetricBlock.SvgColorVariables(value);
public static SegmentedMetricBlock Theme(SegmentedMetricBlock segmentedMetricBlock, VisualTheme value) #

Sets VisualBlockOptions.Theme.

Parameters

segmentedMetricBlock ChartForgeX.VisualBlocks.SegmentedMetricBlock required
The instance.
value ChartForgeX.Themes.VisualTheme required
The value.

Returns

SegmentedMetricBlock The same instance.

Examples

// C# initializer or property                                                                                                                         // C# fluent
((global::ChartForgeX.VisualBlocks.VisualBlock<global::ChartForgeX.VisualBlocks.SegmentedMetricBlock>)segmentedMetricBlock).Options.Theme = value;    segmentedMetricBlock.Theme(value);
public static SegmentedMetricBlock ThemeMode(SegmentedMetricBlock segmentedMetricBlock, ThemeMode value) #

Sets VisualBlockOptions.ThemeMode.

Parameters

segmentedMetricBlock ChartForgeX.VisualBlocks.SegmentedMetricBlock required
The instance.
value ChartForgeX.ThemeMode required
The value.

Returns

SegmentedMetricBlock The same instance.

Examples

// C# initializer or property                                                                                                                             // C# fluent
((global::ChartForgeX.VisualBlocks.VisualBlock<global::ChartForgeX.VisualBlocks.SegmentedMetricBlock>)segmentedMetricBlock).Options.ThemeMode = value;    segmentedMetricBlock.ThemeMode(value);
public static SegmentedMetricBlock Title(SegmentedMetricBlock segmentedMetricBlock, string value) #

Sets VisualBlock<SegmentedMetricBlock>.Title.

Parameters

segmentedMetricBlock ChartForgeX.VisualBlocks.SegmentedMetricBlock required
The instance.
value string required
The value.

Returns

SegmentedMetricBlock The same instance.

Examples

// C# initializer or property                                                   // C# fluent
new global::ChartForgeX.VisualBlocks.SegmentedMetricBlock { Title = value };    segmentedMetricBlock.Title(value);
public static SegmentedMetricBlock TransparentBackground(SegmentedMetricBlock segmentedMetricBlock, bool value = true) #

Sets VisualBlockOptions.TransparentBackground.

Parameters

segmentedMetricBlock ChartForgeX.VisualBlocks.SegmentedMetricBlock required
The instance.
value bool = true optional
The value; true when omitted.

Returns

SegmentedMetricBlock The same instance.

Examples

// C# initializer or property                                                                                                                                         // C# fluent
((global::ChartForgeX.VisualBlocks.VisualBlock<global::ChartForgeX.VisualBlocks.SegmentedMetricBlock>)segmentedMetricBlock).Options.TransparentBackground = value;    segmentedMetricBlock.TransparentBackground(value);
public static SegmentedMetricBlock Unit(SegmentedMetricBlock segmentedMetricBlock, string value) #

Sets SegmentedMetricBlock.Unit: Gets the unit suffix rendered beside item values for composition-style blocks.

Parameters

segmentedMetricBlock ChartForgeX.VisualBlocks.SegmentedMetricBlock required
The instance.
value string required
The value.

Returns

SegmentedMetricBlock The same instance.

Examples

// C# initializer or property                                                  // C# fluent
new global::ChartForgeX.VisualBlocks.SegmentedMetricBlock { Unit = value };    segmentedMetricBlock.Unit(value);
public static SegmentedMetricBlock Value(SegmentedMetricBlock segmentedMetricBlock, string value) #

Sets SegmentedMetricBlock.Value: Gets the metric value.

Parameters

segmentedMetricBlock ChartForgeX.VisualBlocks.SegmentedMetricBlock required
The instance.
value string required
The value.

Returns

SegmentedMetricBlock The same instance.

Examples

// C# initializer or property                                                   // C# fluent
new global::ChartForgeX.VisualBlocks.SegmentedMetricBlock { Value = value };    segmentedMetricBlock.Value(value);