API Reference
Histogram
Vertical bars for a distribution: values are counted into buckets defined by edges, bars grow with eighth-block precision, the largest count labels the top and bucket labels sit under the bars. Live operation: add (Value).
Inheritance
- LiveWidget
- Histogram
Usage
Explore 17 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 9
- Extension method Histogram.WithEdgeFormat
- Extension method Histogram.WithHeight
- Extension method Histogram.WithToken
- Extension method Histogram.WithUnit
- Method Histogram.Add
- Method HistogramFluent.WithEdgeFormat
- Method HistogramFluent.WithHeight
- Method HistogramFluent.WithToken
- Method HistogramFluent.WithUnit
Accepted by parameters 8
- Extension method Histogram.WithEdgeFormat
- Extension method Histogram.WithHeight
- Extension method Histogram.WithToken
- Extension method Histogram.WithUnit
- Method HistogramFluent.WithEdgeFormat
- Method HistogramFluent.WithHeight
- Method HistogramFluent.WithToken
- Method HistogramFluent.WithUnit
Constructors
public Histogram(IReadOnlyList<Double> edges, String name = "histogram") #Creates a histogram.
Parameters
- edges System.Collections.Generic.IReadOnlyList<System.Double>
- Ascending bucket edges; values below the first edge go to the first bucket, values at or above the last edge to the last.
- name System.String = "histogram"
- The live name (default histogram).
Methods
public Histogram Add(Double value) #HistogramCounts a value.
Parameters
- value System.Double
- The value.
Returns
This instance.
public override Void Apply(LiveEvent liveEvent) #VoidApplies an event to the widget's state.
Parameters
- liveEvent ConsoleMonster.Live.LiveEvent
- The event.
public SparklineHandle Handle(ILiveDispatcher dispatcher) #SparklineHandleReturns a handle that adds values through a dispatcher.
Parameters
- dispatcher ConsoleMonster.Live.ILiveDispatcher
- The dispatcher.
Returns
The handle.
public override Size Measure(Constraints constraints, RenderContext context) #SizeReturns the size the widget wants within the constraints.
Parameters
- constraints ConsoleMonster.Layout.Constraints
- The space offered.
- context ConsoleMonster.Canvas.RenderContext
- Profile, theme and glyphs.
Returns
The desired size, never larger than the constraints.
public override Void Render(Region region, RenderContext context) #VoidRenders into a region. The region may be smaller or larger than the measured size.
Parameters
- region ConsoleMonster.Canvas.Region
- The target region.
- context ConsoleMonster.Canvas.RenderContext
- Profile, theme and glyphs.
Inherited Methods
public virtual String? Describe(LiveEvent liveEvent) #String?Parameters
- liveEvent LiveEvent
public virtual Boolean Equals(Object? obj) #BooleanParameters
- obj Object?
Properties
public ThemeToken Token { get; set; } #The bar colour token (default ThemeToken.Series1).
public Func<Double, String>? EdgeFormat { get; set; } #Formats the bucket edge labels (for example milliseconds as 250ms and 1s), or null for the compact number and Histogram.Unit.
Inherited Properties
Extension Methods
public static Histogram WithEdgeFormat(Histogram histogram, Func<Double, String>? value) #HistogramSets Histogram.EdgeFormat: Formats the bucket edge labels (for example milliseconds as 250ms and 1s), or null for the compact number and Histogram.Unit.
Parameters
- histogram ConsoleMonster.Widgets.Histogram
- The instance.
- value System.Func<System.Double, System.String>?
- The value.
Returns
The same instance.
public static Histogram WithHeight(Histogram histogram, Int32 value) #HistogramSets Histogram.Height: Rows for the bars (default 6).
Parameters
- histogram ConsoleMonster.Widgets.Histogram
- The instance.
- value System.Int32
- The value.
Returns
The same instance.
public static Histogram WithToken(Histogram histogram, ThemeToken value) #HistogramSets Histogram.Token: The bar colour token (default ThemeToken.Series1).
Parameters
- histogram ConsoleMonster.Widgets.Histogram
- The instance.
- value ConsoleMonster.Styling.ThemeToken
- The value.
Returns
The same instance.
public static Histogram WithUnit(Histogram histogram, String? value) #HistogramSets Histogram.Unit: A unit for bucket labels (for example s).
Parameters
- histogram ConsoleMonster.Widgets.Histogram
- The instance.
- value System.String?
- The value.
Returns
The same instance.