DateBins
public readonly struct DateBinsDate bin specification. Swift Charts equivalent: DateBins. Uses calendar
units rather than raw seconds for human-friendly histogram boundaries.
Fields
Section titled “Fields”
public readonly DateBins.Kind ModeReturns
ChartGuru.DateBins.Kind
public readonly int CountReturns
System.Int32
public readonly TimeUnit UnitReturns
ChartGuru.TimeUnit
UnitCount
Section titled “UnitCount”public readonly int UnitCountReturns
System.Int32
Thresholds
Section titled “Thresholds”public readonly DateTime[] ThresholdsReturns
System.DateTime[]
Automatic
Section titled “Automatic”public static readonly DateBins AutomaticReturns
ChartGuru.DateBins
Methods
Section titled “Methods”
ByCount(int)
Section titled “ByCount(int)”public static DateBins ByCount(int count)Requests an evenly distributed number of date bins, clamping the count to at least one.
Parameters
| Name | Type |
|---|---|
count |
System.Int32 |
Returns
ChartGuru.DateBins
ByStride(TimeUnit, int)
Section titled “ByStride(TimeUnit, int)”public static DateBins ByStride(TimeUnit unit, int count = 1)Creates calendar bins at a fixed multiple of the selected time unit, clamping the multiple to at least one.
Parameters
| Name | Type |
|---|---|
unit |
ChartGuru.TimeUnit |
count |
System.Int32 |
Returns
ChartGuru.DateBins
ByThresholds(IEnumerable)
Section titled “ByThresholds(IEnumerable)”public static DateBins ByThresholds(IEnumerable<DateTime> thresholds)Creates date bins separated by a sorted copy of the supplied thresholds. A null sequence produces one bin.
Parameters
| Name | Type |
|---|---|
thresholds |
System.Collections.Generic.IEnumerable{System.DateTime} |
Returns
ChartGuru.DateBins
ComputeEdges(DateTime, DateTime)
Section titled “ComputeEdges(DateTime, DateTime)”public double[] ComputeEdges(DateTime rawMin, DateTime rawMax)Compute edges as Unix-second floats (chart-native time representation).
Parameters
| Name | Type |
|---|---|
rawMin |
System.DateTime |
rawMax |
System.DateTime |
Returns
System.Double[]