Tesserae

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 .

Constructors

Constructor
TimeHistogramBucket
public TimeHistogramBucket()

Initializes a new instance of this class.

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

Initializes a new instance of this class.

Properties

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

Constructors

Constructor
TimeHistogramPicker
public TimeHistogramPicker(DateTime[] values, int maxBuckets = 80)

Initializes a new instance of this class.

Constructor
TimeHistogramPicker
public TimeHistogramPicker(TimeHistogramBucket[] buckets) : this((DateTime[])null)

Initializes a new instance of this class.

Properties

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

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 Tesserae. All rights reserved.