API Reference
ChartHistogramBinLayout
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.
Returned or exposed by 7
- Property ChartHistogramBin.Layout
- Method ChartHistogramBinLayout.FromBoundaries
- Method ChartHistogramBinLayout.FromCount
- Method ChartHistogramBinLayout.FromIntervals
- Method ChartHistogramBinLayout.FromWidth
- Property ChartSeries.HistogramBinLayout
- Property ChartDataBin.Layout
Accepted by parameters 2
- Method Chart.AddHistogram
- Method ChartDataset.Bin
Methods
public static ChartHistogramBinLayout FromBoundaries(IEnumerable<Double> boundaries) #ChartHistogramBinLayoutCreates adjacent bins from strictly increasing finite boundaries, preserving their unequal widths.
Parameters
- boundaries System.Collections.Generic.IEnumerable<System.Double>
- 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.
public static ChartHistogramBinLayout FromCount(Double minimum, Double maximum, Int32 binCount) #ChartHistogramBinLayoutCreates the requested count of equal-width bins with boundaries aligned to a nice decimal step where possible.
Parameters
- minimum System.Double
- maximum System.Double
- binCount System.Int32
public static ChartHistogramBinLayout FromCount(Double minimum, Double maximum, Int32 binCount, Boolean roundBounds) #ChartHistogramBinLayoutCreates bins with rounded, aligned bounds, or preserves exact data bounds when roundBounds is false.
Parameters
- minimum System.Double
- The lowest data value.
- maximum System.Double
- The highest data value.
- binCount System.Int32
- The requested count; constant data uses one bin.
- roundBounds System.Boolean
- 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) #ChartHistogramBinLayoutCreates finite, ordered, nonoverlapping bins with optional gaps between intervals.
Parameters
- intervals System.Collections.Generic.IEnumerable<System.ValueTuple<System.Double, System.Double>>
- 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.
public static ChartHistogramBinLayout FromWidth(Double minimum, Double maximum, Double binWidth) #ChartHistogramBinLayoutPreserves the requested width and aligns all boundaries to its multiples, extending the domain to cover the data.
Parameters
- minimum System.Double
- maximum System.Double
- binWidth System.Double
public static ChartHistogramBinLayout FromWidth(Double minimum, Double maximum, Double binWidth, Boolean roundBounds) #ChartHistogramBinLayoutPreserves the width, using aligned equal-width bins or exact bounds with a possible final remainder bin.
Parameters
- minimum System.Double
- The lowest data value.
- maximum System.Double
- The highest data value.
- binWidth System.Double
- The caller's positive bin width.
- roundBounds System.Boolean
- Whether to align bounds to multiples of the width.
Returns
A reusable bin layout.
public Double GetCenter(Int32 index) #DoubleGets the midpoint used for the bin's chart coordinate.
Parameters
- index System.Int32
public Double GetLowerBound(Int32 index) #DoubleGets the inclusive lower bound for a bin.
Parameters
- index System.Int32
public Double GetUpperBound(Int32 index) #DoubleGets the upper bound for a bin. The final bin includes this value.
Parameters
- index System.Int32
public Double GetWidth(Int32 index) #DoubleGets the actual width of a bin, including a shorter final bin or an authored unequal interval.
Parameters
- index System.Int32
Inherited Methods
public virtual Boolean Equals(Object? obj) #BooleanParameters
- obj Object?