API Reference
MetricCard
A compact KPI or metric card visual block.
Inheritance
- FactualVisualBlock<MetricCard>
- MetricCard
Usage
Explore 30 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 29
- Method MetricCard.AddDetail
- Method MetricCard.Create
- Method MetricCard.WithBadgePlacement
- Method MetricCard.WithCaption
- Method MetricCard.WithCard
- Method MetricCard.WithHostFrame
- Method MetricCard.WithIcon
- Method MetricCard.WithMetric
- Method MetricCard.WithMicroVisualPlacement
- Method MetricCard.WithMicroVisualSurface
- Method MetricCard.WithMiniBars
- Method MetricCard.WithMiniSparkline
- Method MetricCard.WithMiniSparklineStyle
- Method MetricCard.WithoutMiniBars
- Method MetricCard.WithoutMiniSparkline
- Method MetricCard.WithPadding
- Method MetricCard.WithPngOutputScale
- Method MetricCard.WithSecondaryMiniSparkline
- Method MetricCard.WithSecondarySparkline
- Method MetricCard.WithSize
- Method MetricCard.WithSparkline
- Method MetricCard.WithStatus
- Method MetricCard.WithSubtitle
- Method MetricCard.WithSymbol
- Method MetricCard.WithTheme
- Method MetricCard.WithTitle
- Method MetricCard.WithTransparentBackground
- Method MetricCard.WithTrend
- Method MetricCard.WithUnit
Accepted by parameters 1
- Method VisualGrid.CreateMetricStrip
Constructors
public MetricCard() #Methods
public MetricCard AddDetail(String label, Object? value, VisualStatus status = Neutral, String? format = null) #MetricCardAdds a compact detail row to the card.
Parameters
- label System.String
- value System.Object?
- status ChartForgeX.VisualBlocks.VisualStatus = Neutral
- format System.String? = null
public MetricCard WithBadgePlacement(MetricCardBadgePlacement placement) #MetricCardSets the badge placement when an icon or symbol is configured.
Parameters
- placement ChartForgeX.VisualBlocks.MetricCardBadgePlacement
public MetricCard WithCaption(String caption) #MetricCardSets optional supporting text.
Parameters
- caption System.String
public MetricCard WithIcon(VisualIcon icon) #MetricCardSets an optional built-in icon rendered as a badge.
Parameters
- icon ChartForgeX.VisualBlocks.VisualIcon
public MetricCard WithMetric(String label, Object? value, String? format = null, String? unit = null) #MetricCardSets the primary metric label and value.
Parameters
- label System.String
- value System.Object?
- format System.String? = null
- unit System.String? = null
public MetricCard WithMetric(String label, Double value, ChartValueFormat format, String? unit = null) #MetricCardSets a numeric metric using the same display policy as chart labels and axes.
Parameters
- label System.String
- value System.Double
- format ChartForgeX.Core.ChartValueFormat
- unit System.String? = null
public MetricCard WithMicroVisualPlacement(MetricCardMicroVisualPlacement placement) #MetricCardSets where compact mini charts are rendered inside the metric card.
Parameters
- placement ChartForgeX.VisualBlocks.MetricCardMicroVisualPlacement
public MetricCard WithMicroVisualSurface(MetricCardMicroVisualSurface surface) #MetricCardSets the optional surface treatment for compact mini visuals.
Parameters
- surface ChartForgeX.VisualBlocks.MetricCardMicroVisualSurface
public MetricCard WithMiniBars(IEnumerable<Double> values, Double? minimum = null, Double? maximum = null, ChartColor? color = null, ChartColor? mutedColor = null, Int32? highlightIndex = null) #MetricCardReplaces compact bar values rendered inside the metric card.
Parameters
- values System.Collections.Generic.IEnumerable<System.Double>
- minimum System.Double? = null
- maximum System.Double? = null
- color ChartForgeX.Primitives.ChartColor? = null
- mutedColor ChartForgeX.Primitives.ChartColor? = null
- highlightIndex System.Int32? = null
public MetricCard WithMiniSparkline(IEnumerable<Double> values, Double? minimum = null, Double? maximum = null, ChartColor? color = null, ChartColor? fillColor = null) #MetricCardReplaces compact sparkline values rendered inside the metric card.
Parameters
- values System.Collections.Generic.IEnumerable<System.Double>
- minimum System.Double? = null
- maximum System.Double? = null
- color ChartForgeX.Primitives.ChartColor? = null
- fillColor ChartForgeX.Primitives.ChartColor? = null
public MetricCard WithMiniSparklineStyle(ChartLineAreaForm style) #MetricCardSets the mini sparkline presentation style.
Parameters
- style ChartForgeX.Core.ChartLineAreaForm
public MetricCard WithoutMiniBars() #MetricCardClears compact bar values from the metric card.
public MetricCard WithoutMiniSparkline() #MetricCardClears compact sparkline values from the metric card.
public MetricCard WithSecondaryMiniSparkline(IEnumerable<Double> values, ChartColor? color = null) #MetricCardReplaces optional secondary sparkline values rendered with the primary sparkline.
Parameters
- values System.Collections.Generic.IEnumerable<System.Double>
- color ChartForgeX.Primitives.ChartColor? = null
public MetricCard WithSecondarySparkline(SparklineData data, ChartColor? color = null) #MetricCardSets secondary samples. Bounds belong to the primary sparkline and are shared by both series.
Parameters
- data ChartForgeX.Core.SparklineData
- color ChartForgeX.Primitives.ChartColor? = null
public MetricCard WithSparkline(SparklineData data, ChartColor? color = null, ChartColor? fillColor = null) #MetricCardSets shared sparkline samples, retaining missing slots, zeroes and the requested domain.
Parameters
- data ChartForgeX.Core.SparklineData
- color ChartForgeX.Primitives.ChartColor? = null
- fillColor ChartForgeX.Primitives.ChartColor? = null
public MetricCard WithStatus(VisualStatus status) #MetricCardSets the metric status.
Parameters
- status ChartForgeX.VisualBlocks.VisualStatus
public MetricCard WithSymbol(String symbol) #MetricCardSets an optional compact symbol rendered as a badge.
Parameters
- symbol System.String
public MetricCard WithTrend(String trend) #MetricCardSets optional trend text.
Parameters
- trend System.String
public MetricCard WithUnit(String unit) #MetricCardSets an optional metric unit rendered beside the value.
Parameters
- unit System.String
Inherited Methods
public virtual Boolean Equals(Object? obj) #BooleanParameters
- obj Object?
public override RgbaImage RenderRgba() #RgbaImagepublic override String RenderSvg(String idScope) #StringParameters
- idScope String
public MetricCard WithCard(Boolean enabled = true) #MetricCardParameters
- enabled Boolean = true
public MetricCard WithHostFrame(Boolean hostOwnsFrame = true) #MetricCardParameters
- hostOwnsFrame Boolean = true
public MetricCard WithPadding(Double padding) #MetricCardParameters
- padding Double
public MetricCard WithPadding(Double left, Double top, Double right, Double bottom) #MetricCardParameters
- left Double
- top Double
- right Double
- bottom Double
public MetricCard WithPngOutputScale(Int32 scale) #MetricCardParameters
- scale Int32
public MetricCard WithSize(Int32 width, Int32 height) #MetricCardParameters
- width Int32
- height Int32
public MetricCard WithSubtitle(String subtitle) #MetricCardParameters
- subtitle String
public MetricCard WithTheme(ChartTheme theme) #MetricCardParameters
- theme ChartTheme
public MetricCard WithTitle(String title) #MetricCardParameters
- title String
public MetricCard WithTransparentBackground(Boolean enabled = true) #MetricCardParameters
- enabled Boolean = true
Properties
public IReadOnlyList<Double> MiniBars { get; } #Gets compact bar values rendered inside the metric card.
public IReadOnlyList<Double> MiniSparkline { get; } #Gets compact sparkline values rendered inside the metric card.
public IReadOnlyList<Double> SecondaryMiniSparkline { get; } #Gets optional secondary sparkline values rendered beside the primary sparkline.
public IReadOnlyList<MetricCardDetail> Details { get; } #Gets compact supporting detail rows rendered inside the card.
public String Label { get; set; } #Gets or sets the metric label.
public String Value { get; set; } #Gets or sets the metric value.
public String Unit { get; set; } #Gets or sets an optional metric unit rendered beside the value.
public String Caption { get; set; } #Gets or sets optional supporting text.
public String Trend { get; set; } #Gets or sets optional trend text.
public String Symbol { get; set; } #Gets or sets an optional compact symbol rendered as a badge.
public Int32? MiniBarHighlightIndex { get; set; } #Gets or sets the zero-based mini bar to emphasize. When unset, the last mini bar is emphasized.
public Double? MiniBarMinimum { get; set; } #Gets or sets the optional lower bound used for mini bar scaling.
public Double? MiniBarMaximum { get; set; } #Gets or sets the optional upper bound used for mini bar scaling.
public Double? MiniSparklineMinimum { get; set; } #Gets or sets the optional lower bound used for mini sparkline scaling.
public Double? MiniSparklineMaximum { get; set; } #Gets or sets the optional upper bound used for mini sparkline scaling.
public ChartColor? MiniBarColor { get; set; } #Gets or sets the optional color for the emphasized mini bar.
public ChartColor? MiniBarMutedColor { get; set; } #Gets or sets the optional color for non-emphasized mini bars.
public ChartColor? MiniSparklineColor { get; set; } #Gets or sets the optional stroke color for the mini sparkline.
public ChartColor? MiniSparklineFillColor { get; set; } #Gets or sets the optional fill color under the mini sparkline.
public ChartColor? SecondaryMiniSparklineColor { get; set; } #Gets or sets the optional stroke color for the secondary mini sparkline.
public ChartLineAreaForm MiniSparklineStyle { get; set; } #Gets or sets the mini sparkline presentation style.
public VisualIcon Icon { get; set; } #Gets or sets an optional built-in icon rendered as a badge.
public VisualStatus Status { get; set; } #Gets or sets the metric status.
public MetricCardBadgePlacement BadgePlacement { get; set; } #Gets or sets the badge placement when an icon or symbol is configured.
public MetricCardMicroVisualPlacement MicroVisualPlacement { get; set; } #Gets or sets where compact mini charts are rendered inside the metric card.
public MetricCardMicroVisualSurface MicroVisualSurface { get; set; } #Gets or sets the optional surface treatment for the mini visual.
public override String AccessibleName { get; } #Gets a concise accessibility label.
public SparklineData? SparklineData { get; private set; } #Gets configured sample slots; null indicates the finite-value convenience API is in use.
public SparklineData? SecondarySparklineData { get; private set; } #Gets configured secondary sample slots, which share the primary display domain.