HtmlForgeX

API Reference

Class

TablerSparkline

Namespace HtmlForgeX
Assembly HtmlForgeX
Base Element
Modifiers sealed

Compact inline sparkline (bar-style) for small trend visualization in tables and cards.

Inheritance

Constructors

Methods

AddPoint 2 overloads
public TablerSparkline AddPoint(Double value, RGBColor color) #
Returns: TablerSparkline

Adds a point to the sparkline.

Parameters

value System.Double requiredposition: 0
color System.Nullable{HtmlForgeX.TablerColor} = null requiredposition: 1
AddPoint(System.Double value, HtmlForgeX.RGBColor color) #

Adds a point to the sparkline.

Parameters

value System.Double required
color HtmlForgeX.RGBColor required
public TablerSparkline BarWidth(Int32 pixels) #
Returns: TablerSparkline

Sets the width of each bar in pixels.

Parameters

pixels System.Int32 requiredposition: 0
Color 2 overloads
public TablerSparkline Color(RGBColor color) #
Returns: TablerSparkline

Sets the default bar color.

Parameters

color HtmlForgeX.TablerColor requiredposition: 0
Color(HtmlForgeX.RGBColor color) #

Sets the default bar color.

Parameters

color HtmlForgeX.RGBColor required
ColorScale 2 overloads
public TablerSparkline ColorScale(Func<Double, RGBColor> selector) #
Returns: TablerSparkline

Sets a color selector for per-bar colors.

Parameters

selector System.Func{System.Double,System.Nullable{HtmlForgeX.TablerColor}} requiredposition: 0
ColorScale(System.Func{System.Double,HtmlForgeX.RGBColor} selector) #

Sets a color selector for per-bar colors.

Parameters

selector System.Func{System.Double,HtmlForgeX.RGBColor} required
public TablerSparkline Gap(Int32 pixels) #
Returns: TablerSparkline

Sets the gap between bars in pixels.

Parameters

pixels System.Int32 requiredposition: 0
public TablerSparkline Height(Int32 pixels) #
Returns: TablerSparkline

Sets the overall height of the sparkline bars in pixels.

Parameters

pixels System.Int32 requiredposition: 0
Latest 2 overloads
public TablerSparkline Latest(String text, RGBColor color) #
Returns: TablerSparkline

Sets a label displayed next to the sparkline (e.g., "Latest 29.0%").

Parameters

text System.String requiredposition: 0
color System.Nullable{HtmlForgeX.TablerColor} = null requiredposition: 1
Latest(System.String text, HtmlForgeX.RGBColor color) #

Sets a label displayed next to the sparkline (e.g., "Latest 29.0%").

Parameters

text System.String required
color HtmlForgeX.RGBColor required
public TablerSparkline MinBarHeight(Int32 pixels) #
Returns: TablerSparkline

Sets the minimum bar height to keep tiny values visible.

Parameters

pixels System.Int32 requiredposition: 0
public TablerSparkline Points(IEnumerable<Double> values) #
Returns: TablerSparkline

Replaces the current points with the provided values.

Parameters

values System.Collections.Generic.IEnumerable{System.Double} requiredposition: 0
RegisterLibraries() #
public TablerSparkline Title(String title) #
Returns: TablerSparkline

Sets a tooltip title for the sparkline.

Parameters

title System.String requiredposition: 0
public override String ToString() #
Returns: String