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

ChartHistogramBinLayout

Namespace ChartForgeX.Core
Assembly ChartForgeX
Modifiers sealed

Defines one reusable histogram binning scheme so multiple series can share identical bounds.

Inheritance

  • Object
  • ChartHistogramBinLayout

Usage

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

Accepted by parameters 2

Methods

public static ChartHistogramBinLayout FromBoundaries(IEnumerable<Double> boundaries) #
Returns: ChartHistogramBinLayout

Creates adjacent bins from strictly increasing finite boundaries, preserving their unequal widths.

Parameters

boundaries System.Collections.Generic.IEnumerable<System.Double> requiredposition: 0
At least two boundaries, in increasing order. Inputs are copied.

Returns

An immutable reusable layout. Each bin is half open except the final inclusive upper bound.

FromCount 2 overloads
public static ChartHistogramBinLayout FromCount(Double minimum, Double maximum, Int32 binCount) #
Returns: ChartHistogramBinLayout

Creates the requested count of equal-width bins with boundaries aligned to a nice decimal step where possible.

Parameters

minimum System.Double requiredposition: 0
maximum System.Double requiredposition: 1
binCount System.Int32 requiredposition: 2
public static ChartHistogramBinLayout FromCount(Double minimum, Double maximum, Int32 binCount, Boolean roundBounds) #
Returns: ChartHistogramBinLayout

Creates bins with rounded, aligned bounds, or preserves exact data bounds when roundBounds is false.

Parameters

minimum System.Double requiredposition: 0
The lowest data value.
maximum System.Double requiredposition: 1
The highest data value.
binCount System.Int32 requiredposition: 2
The requested count; constant data uses one bin.
roundBounds System.Boolean requiredposition: 3
Whether to align to multiples of a 1, 2, 2.5, 5 or 10 decimal step. A single bin crossing zero preserves the data bounds because no zero-aligned interval can cover both signs.

Returns

A reusable bin layout.

public static ChartHistogramBinLayout FromIntervals(IEnumerable<ValueTuple<Double, Double>> intervals) #
Returns: ChartHistogramBinLayout

Creates finite, ordered, nonoverlapping bins with optional gaps between intervals.

Parameters

intervals System.Collections.Generic.IEnumerable<System.ValueTuple<System.Double, System.Double>> requiredposition: 0
Positive-width intervals in increasing order. Inputs are copied; values in gaps are rejected.

Returns

An immutable reusable layout. Each interval is half open except the final inclusive upper bound.

FromWidth 2 overloads
public static ChartHistogramBinLayout FromWidth(Double minimum, Double maximum, Double binWidth) #
Returns: ChartHistogramBinLayout

Preserves the requested width and aligns all boundaries to its multiples, extending the domain to cover the data.

Parameters

minimum System.Double requiredposition: 0
maximum System.Double requiredposition: 1
binWidth System.Double requiredposition: 2
public static ChartHistogramBinLayout FromWidth(Double minimum, Double maximum, Double binWidth, Boolean roundBounds) #
Returns: ChartHistogramBinLayout

Preserves the width, using aligned equal-width bins or exact bounds with a possible final remainder bin.

Parameters

minimum System.Double requiredposition: 0
The lowest data value.
maximum System.Double requiredposition: 1
The highest data value.
binWidth System.Double requiredposition: 2
The caller's positive bin width.
roundBounds System.Boolean requiredposition: 3
Whether to align bounds to multiples of the width.

Returns

A reusable bin layout.

public Double GetCenter(Int32 index) #
Returns: Double

Gets the midpoint used for the bin's chart coordinate.

Parameters

index System.Int32 requiredposition: 0
public Double GetLowerBound(Int32 index) #
Returns: Double

Gets the inclusive lower bound for a bin.

Parameters

index System.Int32 requiredposition: 0
public Double GetUpperBound(Int32 index) #
Returns: Double

Gets the upper bound for a bin. The final bin includes this value.

Parameters

index System.Int32 requiredposition: 0
public Double GetWidth(Int32 index) #
Returns: Double

Gets the actual width of a bin, including a shorter final bin or an authored unequal interval.

Parameters

index System.Int32 requiredposition: 0

Properties

public Double Minimum { get; } #

Gets the inclusive minimum covered by the layout.

public Double Maximum { get; } #

Gets the inclusive maximum covered by the layout.

public Int32 Count { get; } #

Gets the number of bins.