Skip to content
daisyBlazor

RangeSelector

A compact overview of a time series with a window you move and resize, to pick the stretch of time a chart shows in detail. Drag the window to move it and its handles to resize it; the handles are sliders, so arrows move them by one step, Shift+arrow by ten, Home and End to the limits. Outside the window is dimmed.
Over time
Cover · <RangeSelector>
Range selector 120 points from May 1, 2026 to Aug 28, 2026; selected Jul 1, 2026 to Aug 15, 2026. MayJunJulAug

Examples

Basic

Points holds a RangeSelectorPoint (a Time and a Value) per moment. Bind From and To with @bind-From and @bind-To; Step snaps the window to whole steps (a day here) and is the arrow keys' step.

Requests per day, last six months
Requests per day, last six months 183 points from Apr 20, 2026 to Oct 19, 2026; selected Aug 1, 2026 to Sep 1, 2026. MayJunJulAugSepOct

Selected: Aug 1 to Sep 1, 2026 (31 days, 1,835,237 requests)

website/Examples/Charts/RangeSelectorBasicExample.razor Source

With a chart

Bind From and To to fields and give the chart only the data between them: here the candles of a CandlestickChart, filtered on Time. Moving the window redraws the chart as you drag. The same works for a LineChart, filtering its labels and values.

CPU utilisation per hour, api-01 (%)
CPU utilisation per hour, api-01 (%)49 periods from Oct 12, 2026 to Oct 14, 2026; 20 rising, 29 falling; lowest 38 %, highest 79.7 %. Indicators: SMA 6.06:0012:0018:00Oct 1306:0012:0018:0035404550556065707580Oct 12, 2026: open 40.5 %, high 47.5 %, low 39.5 %, close 45.5 % Oct 12, 2026 01:00: open 45.5 %, high 66.5 %, low 44 %, close 63.5 % Oct 12, 2026 02:00: open 63.5 %, high 67.5 %, low 59.5 %, close 61.5 % Oct 12, 2026 03:00: open 61.5 %, high 66.5 %, low 44 %, close 46.5 % Oct 12, 2026 04:00: open 46.5 %, high 52.5 %, low 41.5 %, close 44.5 % Oct 12, 2026 05:00: open 44.5 %, high 51.5 %, low 39 %, close 42.5 %; SMA 6 50.7 % Oct 12, 2026 06:00: open 42.5 %, high 44.5 %, low 39.5 %, close 40.5 %; SMA 6 49.8 % Oct 12, 2026 07:00: open 40.5 %, high 55.8 %, low 39 %, close 52.8 %; SMA 6 48.1 % Oct 12, 2026 08:00: open 52.8 %, high 61.6 %, low 50.8 %, close 57.6 %; SMA 6 47.4 % Oct 12, 2026 09:00: open 57.6 %, high 66.1 %, low 55.1 %, close 61.1 %; SMA 6 49.8 % Oct 12, 2026 10:00: open 61.1 %, high 76.2 %, low 58.1 %, close 70.2 %; SMA 6 54.1 % Oct 12, 2026 11:00: open 70.2 %, high 77.2 %, low 66.7 %, close 70.2 %; SMA 6 58.7 % Oct 12, 2026 12:00: open 70.2 %, high 72.2 %, low 67.2 %, close 68.2 %; SMA 6 63.4 % Oct 12, 2026 13:00: open 68.2 %, high 71.2 %, low 62.7 %, close 64.2 %; SMA 6 65.3 % Oct 12, 2026 14:00: open 64.2 %, high 69.1 %, low 62.2 %, close 65.1 %; SMA 6 66.5 % Oct 12, 2026 15:00: open 65.1 %, high 70.1 %, low 55.1 %, close 57.6 %; SMA 6 65.9 % Oct 12, 2026 16:00: open 57.6 %, high 63.6 %, low 45.8 %, close 48.8 %; SMA 6 62.4 % Oct 12, 2026 17:00: open 48.8 %, high 55.8 %, low 43 %, close 46.5 %; SMA 6 58.4 % Oct 12, 2026 18:00: open 46.5 %, high 48.5 %, low 43.5 %, close 44.5 %; SMA 6 54.5 % Oct 12, 2026 19:00: open 44.5 %, high 47.5 %, low 41 %, close 42.5 %; SMA 6 50.8 % Oct 12, 2026 20:00: open 42.5 %, high 46.5 %, low 38.5 %, close 40.5 %; SMA 6 46.7 % Oct 12, 2026 21:00: open 40.5 %, high 50.5 %, low 38 %, close 45.5 %; SMA 6 44.7 % Oct 12, 2026 22:00: open 45.5 %, high 51.5 %, low 40.5 %, close 43.5 %; SMA 6 43.8 % Oct 12, 2026 23:00: open 43.5 %, high 50.5 %, low 39.5 %, close 43 %; SMA 6 43.3 % Oct 13, 2026: open 43 %, high 50 %, low 42 %, close 48 %; SMA 6 43.8 % Oct 13, 2026 01:00: open 48 %, high 69 %, low 46.5 %, close 66 %; SMA 6 47.8 % Oct 13, 2026 02:00: open 66 %, high 70 %, low 62 %, close 64 %; SMA 6 51.7 % Oct 13, 2026 03:00: open 64 %, high 69 %, low 39.5 %, close 42 %; SMA 6 51.1 % Oct 13, 2026 04:00: open 42 %, high 53 %, low 39 %, close 47 %; SMA 6 51.7 % Oct 13, 2026 05:00: open 47 %, high 54 %, low 41.5 %, close 45 %; SMA 6 52 % Oct 13, 2026 06:00: open 45 %, high 47 %, low 42 %, close 43 %; SMA 6 51.2 % Oct 13, 2026 07:00: open 43 %, high 58.3 %, low 41.5 %, close 55.3 %; SMA 6 49.4 % Oct 13, 2026 08:00: open 55.3 %, high 64.1 %, low 53.3 %, close 60.1 %; SMA 6 48.7 % Oct 13, 2026 09:00: open 60.1 %, high 68.6 %, low 57.6 %, close 63.6 %; SMA 6 52.3 % Oct 13, 2026 10:00: open 63.6 %, high 71.7 %, low 60.6 %, close 65.7 %; SMA 6 55.5 % Oct 13, 2026 11:00: open 65.7 %, high 79.7 %, low 62.2 %, close 72.7 %; SMA 6 60.1 % Oct 13, 2026 12:00: open 72.7 %, high 74.7 %, low 69.7 %, close 70.7 %; SMA 6 64.7 % Oct 13, 2026 13:00: open 70.7 %, high 73.7 %, low 65.2 %, close 66.7 %; SMA 6 66.6 % Oct 13, 2026 14:00: open 66.7 %, high 71.6 %, low 64.7 %, close 67.6 %; SMA 6 67.8 % Oct 13, 2026 15:00: open 67.6 %, high 72.6 %, low 57.6 %, close 60.1 %; SMA 6 67.3 % Oct 13, 2026 16:00: open 60.1 %, high 66.1 %, low 48.3 %, close 51.3 %; SMA 6 64.9 % Oct 13, 2026 17:00: open 51.3 %, high 58.3 %, low 38.5 %, close 42 %; SMA 6 59.7 % Oct 13, 2026 18:00: open 42 %, high 49 %, low 41 %, close 47 %; SMA 6 55.8 % Oct 13, 2026 19:00: open 47 %, high 50 %, low 43.5 %, close 45 %; SMA 6 52.2 % Oct 13, 2026 20:00: open 45 %, high 49 %, low 41 %, close 43 %; SMA 6 48.1 % Oct 13, 2026 21:00: open 43 %, high 53 %, low 40.5 %, close 48 %; SMA 6 46.1 % Oct 13, 2026 22:00: open 48 %, high 54 %, low 43 %, close 46 %; SMA 6 45.2 % Oct 13, 2026 23:00: open 46 %, high 53 %, low 42 %, close 45.5 %; SMA 6 45.8 % Oct 14, 2026: open 45.5 %, high 47.5 %, low 42.5 %, close 43.5 %; SMA 6 45.2 %
Rising Falling SMA 6
Range selector 336 points from Oct 5, 2026 00:00 to Oct 18, 2026 23:00; selected Oct 12, 2026 00:00 to Oct 14, 2026 00:00. Oct 6Oct 8Oct 10Oct 12Oct 14Oct 16Oct 18
website/Examples/Charts/RangeSelectorChartExample.razor Source

Playground

Requests per day, last six months
Requests per day, last six months 183 points from Apr 20, 2026 to Oct 19, 2026; selected Apr 20, 2026 to Oct 19, 2026. MayJunJulAugSepOct
<RangeSelector
               Title="Requests per day, last six months"
               Points="@_days" />

@code {
    private DateTime _from = new(2026, 8, 1);
    private DateTime _to = new(2026, 9, 1);

    // Daily request counts: a weekly rhythm and steady growth.
    private static readonly RangeSelectorPoint[] _days = Enumerable.Range(0, 183)
        .Select(i => new RangeSelectorPoint(new DateTime(2026, 4, 20).AddDays(i),
            Math.Round(42000 + i * 160 + 9000 * Math.Sin(i / 7.0 * 2 * Math.PI) + 4000 * Math.Sin(i / 23.0))))
        .ToArray();
}

API

<RangeSelector>

DaisyBlazor.Charts

Parameters

  • Color string
    = "var(--color-primary)"

    CSS colour of the overview and the window.

  • DateFormat string
    = null

    .NET format of the handles' dates read by screen readers; null shows the date, and the time when the points have one.

  • From DateTime
    = 01/01/0001 00:00:00

    Start of the selected window. The default value (or anything before the first point) selects from the first point.

  • FromLabel string
    = "Start of the selected range"

    Accessible name of the start handle.

  • Height string
    = "5rem"

    CSS height of the overview.

  • LineOnly bool
    = false

    Draw only the line of the overview, without the filled area under it.

  • Points IReadOnlyList<RangeSelectorPoint>
    = []

    The series to overview: a value at each time. Points are sorted by time; ones without a finite value are left out.

  • ShowTitle bool
    = true

    Draw Title as a visible heading above the chart (the default); false keeps it only as the chart's accessible name, for a chart inside a card that already has a heading.

  • Smooth bool
    = true

    Smooth the overview with a monotone curve; false joins the points with straight lines.

  • Step TimeSpan?
    = null

    Snap the window to whole steps from the first point (e.g. one hour, one day); the arrow keys move a handle by one step, Shift+arrow by ten, and the window is never shorter than one step. Without a step nothing snaps and the keys step by the smallest gap between points.

  • Title string
    = null

    Optional heading above the selector; also its accessible name.

  • To DateTime
    = 01/01/0001 00:00:00

    End of the selected window. The default value (or anything after the last point) selects up to the last point.

  • ToLabel string
    = "End of the selected range"

    Accessible name of the end handle.

  • Width string
    = "100%"

    CSS width of the selector.

  • Class string
    = null

    Additional CSS classes merged onto the w-full wrapper.

  • Style string
    = null

    Inline styles appended to the wrapper after the width.

Events

  • FromChanged EventCallback<DateTime>

    Raised with the new start when the window is moved or its start handle is dragged or keyed.

  • ToChanged EventCallback<DateTime>

    Raised with the new end when the window is moved or its end handle is dragged or keyed.

Something went wrong while running the docs. Reload