TimeHistogramPicker

Description

A histogram control for selecting a time range

The TimeHistogramPicker turns a DateTime array into adaptive buckets and lets users narrow the selected range from either side.

It sorts a private copy of the input values, so callers can pass unsorted data without changing their source array.

API reference

class

TimeHistogramBucket

public sealed class TimeHistogramBucket

A single bucket (time slice) inside the TimeHistogramPicker.

Namespace
Tesserae

Constructors

NameDescription
TimeHistogramBucketInitializes a new instance of this class.
Constructor
TimeHistogramBucket
Overload
TimeHistogramBucket()Initializes a new instance of this class.
TimeHistogramBucket(DateTime, DateTime, int)Initializes a new instance of this class.
TimeHistogramBucket()
public TimeHistogramBucket()

Initializes a new instance of this class.

TimeHistogramBucket(DateTime, DateTime, int)
public TimeHistogramBucket(DateTime start, DateTime end, int count)

Initializes a new instance of this class.

Parameters

start DateTime
end DateTime
count int

Properties

NameDescription
StartStarts the component's operation.
EndGets or sets the end.
CountGets the number of items in the component.
Property
TimeHistogramBucket.Start
public DateTime Start { get; set; }

Starts the component's operation.

Property
TimeHistogramBucket.End
public DateTime End { get; set; }

Gets or sets the end.

Property
TimeHistogramBucket.Count
public int Count { get; set; }

Gets the number of items in the component.

class

TimeHistogramPicker

public sealed class TimeHistogramPicker : IComponent
Namespace
Tesserae
Implements
IComponent

Constructors

NameDescription
TimeHistogramPickerInitializes a new instance of this class.
Constructor
TimeHistogramPicker
Overload
TimeHistogramPicker(DateTime[], int)Initializes a new instance of this class.
TimeHistogramPicker(TimeHistogramBucket[])Initializes a new instance of this class.
TimeHistogramPicker(DateTime[], int)
public TimeHistogramPicker(DateTime[] values, int maxBuckets = 80)

Initializes a new instance of this class.

Parameters

values DateTime[]
maxBuckets int
TimeHistogramPicker(TimeHistogramBucket[])
public TimeHistogramPicker(TimeHistogramBucket[] buckets) : this((DateTime[])null)

Initializes a new instance of this class.

Parameters

buckets TimeHistogramBucket[]

Properties

NameDescription
SelectedFromGets or sets the selected from.
SelectedToGets or sets the selected to.
SelectedCountGets or sets the selected count.
Property
TimeHistogramPicker.SelectedFrom
public DateTime SelectedFrom

Gets or sets the selected from.

Property
TimeHistogramPicker.SelectedTo
public DateTime SelectedTo

Gets or sets the selected to.

Property
TimeHistogramPicker.SelectedCount
public int SelectedCount

Gets or sets the selected count.

Methods

NameDescription
SetValuesSets the values of the component.
SetBucketsSets the buckets of the component.
SetRangeSets the range of the component.
MaxBucketsConfigures the max buckets on the component.
OnRangeChangedRegisters a callback invoked when the range changed event fires.
WithCustomTimeRenderReturns the component configured with the given custom time render.
ShowCountOnHoverShows the count on hover.
ShowBucketTooltipOnHoverShows the bucket tooltip on hover.
DisabledDisables the component.
RenderRenders the component's root HTML element.
Method
TimeHistogramPicker.SetValues
public TimeHistogramPicker SetValues(DateTime[] values)

Sets the values of the component.

Method
TimeHistogramPicker.SetBuckets
public TimeHistogramPicker SetBuckets(TimeHistogramBucket[] buckets)

Sets the buckets of the component.

Method
TimeHistogramPicker.SetRange
public TimeHistogramPicker SetRange(DateTime from, DateTime to)

Sets the range of the component.

Method
TimeHistogramPicker.MaxBuckets
public TimeHistogramPicker MaxBuckets(int maxBuckets)

Configures the max buckets on the component.

Method
TimeHistogramPicker.OnRangeChanged
public TimeHistogramPicker OnRangeChanged(Action<DateTime, DateTime, int> handler)

Registers a callback invoked when the range changed event fires.

Method
TimeHistogramPicker.WithCustomTimeRender
public TimeHistogramPicker WithCustomTimeRender(Func<DateTime, string> renderTime)

Returns the component configured with the given custom time render.

Method
TimeHistogramPicker.ShowCountOnHover
public TimeHistogramPicker ShowCountOnHover(bool value = true)

Shows the count on hover.

Method
TimeHistogramPicker.ShowBucketTooltipOnHover
public TimeHistogramPicker ShowBucketTooltipOnHover(bool value = true)

Shows the bucket tooltip on hover.

Method
TimeHistogramPicker.Disabled
public TimeHistogramPicker Disabled(bool value = true)

Disables the component.

Method
TimeHistogramPicker.Render
public HTMLElement Render()

Renders the component's root HTML element.

Samples

Three Values

Dense Minute and Hour Data

Fine-grained Seconds

Custom Time Rendering

Sparse Multi-year Data

Gapped Clusters with Uneven Groups

Large Dataset (100,000 Values)

Daily Buckets from Backend

Long-range Aggregated Buckets from Backend

See also

© 2026 Curiosity. All rights reserved.