Skip to content
IzzyBlazor

Enter all results ↑ ↓ move Esc close

Range area chart

Since 0.1.0-alpha.23
Fills a band between each item's low and high values, such as a forecast's interval.

Use a range area for a span that changes over time, such as a forecast's uncertainty or a year of daily temperatures. Many readers take a band's edges as hard limits, so name what it covers, such as "80% interval". For separate names instead of dates, use range bars.

A band with a line through it

ChartRangeAreaSeries fills a band between each item's Low and High. To show the measure inside it, such as a forecast, add a ChartLineSeries after the band, so the line is drawn on top.

Static

Preview

Revenue forecast, 2027
  • 80% interval
  • Expected
Arrow keys move between values; Escape hides the tooltip.

Code

Usage.razor
@* Next year's monthly revenue forecast: the expected amount as a line, and the 80% interval
   around it as a band that widens as the months run further out. *@
<Chart Items="_forecast" Argument="f => f.Month" Title="Revenue forecast, 2027">
    <ChartValueAxis Format="$#,##0,K" />
    <ChartRangeAreaSeries Low="f => f.Low" High="f => f.High" Name="80% interval" Curve="ChartCurve.Smooth" />
    <ChartLineSeries Value="f => f.Expected" Name="Expected" Curve="ChartCurve.Smooth" LineStyle="ChartLineStyle.Solid" />
</Chart>

@code {
    private record Forecast(string Month, decimal Low, decimal Expected, decimal High);

    private readonly Forecast[] _forecast =
    [
        new("Jan", 402_000, 418_000, 434_000), new("Feb", 398_000, 421_000, 445_000),
        new("Mar", 409_000, 437_000, 466_000), new("Apr", 411_000, 444_000, 479_000),
        new("May", 417_000, 455_000, 494_000), new("Jun", 418_000, 461_000, 506_000),
        new("Jul", 414_000, 463_000, 514_000), new("Aug", 419_000, 472_000, 528_000),
        new("Sep", 426_000, 484_000, 545_000), new("Oct", 431_000, 494_000, 560_000),
        new("Nov", 444_000, 512_000, 584_000), new("Dec", 462_000, 536_000, 614_000),
    ];
}

Add this example to a page with the izzy CLI:

bash
izzy add component ChartRangeAreaSeries --at <file>:<line>

Say in the band's Name what it spans, such as "80% interval" or "Min to max": a band with no stated meaning reads as a hard limit.

Curve shapes both edges; give the line the same curve so it stays inside.

Details

Draw the measure inside it (the forecast, the average) as a ChartLineSeries<T> on top, and say in the band's Name what it spans, such as "80% interval".

Mode support

What works in each mode, Range area chart
FeatureStaticInteractive
A band between the lows and highs, edged on both sidesYesYes
A line through it from a line series, such as the forecastYesYes
A value axis that fits the band, not drawn down to zeroYesYes
Each range read low first in tooltips and the tableYesYes
Legend items that hide and show the bandYesYes
A table of the values behind a "Show data" buttonYesYes
Tooltips on hover and from the keyboardYesYes

Static: static server-side rendering, with no circuit and no WebAssembly. Interactive: Server, WebAssembly or Auto.

Without JavaScript

Every page starts as plain HTML: before IzzyBlazor's script loads on a static page, while an interactive page prerenders, and with JavaScript off.

  • Legend items that hide and show the band: waits for the script
  • Tooltips on hover and from the keyboard: waits for the script

Parameters

ChartRangeAreaSeries parameters
PropTypeDefault
LineStyleHow the band's edges are drawn.ChartLineStyle?computed
CurveThe band's shape between values, at both edges.ChartCurveChartCurve.Straight
ConnectGapsDraws the band straight across a missing value, instead of leaving a gap.boolfalse
LowEach item's low end, such as d => d.Min: any number, or null for none (no range at that item).Expression<Func<TItem, object?>>Required
HighEach item's high end, such as d => d.Max.Expression<Func<TItem, object?>>Required
AggregateWith ChartDrillLevel<T>s, how each level adds up its items' values: DataAggregate.Sum (the default), DataAggregate.Avg, DataAggregate.Min, DataAggregate.Max or DataAggregate.Count (the items with a value).DataAggregateDataAggregate.Sum
NameThe series' name, in the legend, the data table and each value's description.string?computed
SeriesBySplits the series into one per value of this, such as p => p.Device: each draws only its own items' values, is named by its value, and takes the next color and marker, in the order the values first appear.Expression<Func<TItem, object?>>?
ColorA CSS color, such as var(--ib-color-danger) or #0f766e.string?computed
LabelsWrites each value beside its bar or point.ChartLabelsChartLabels.None
LabelFormatA .NET format string for this series' labels, such as C0.string?computed
LabelTextWhat each label says in place of its value, such as r => r.Region to name each bubble or point.Expression<Func<TItem, object?>>?
LabelOverlapWhat labels do when they'd overlap others: left out at those widths (ChartLabelOverlap.Hide, the default), or shown anyway (ChartLabelOverlap.Show).ChartLabelOverlapChartLabelOverlap.Hide
TrendDraws a trend through the values: a dashed line in the series' color, named "Revenue trend" (a moving average "Revenue, 7-day average") in the legend, tooltips and data table.ChartTrendChartTrend.None
TrendOrderA polynomial trend's order, 2 (a parabola) to 6.int2
TrendPeriodHow many values a moving average takes in, 2 or more.int3
TrendColorThe trend's CSS color, such as var(--ib-color-danger), used as given.string?computed
ValueAxisThe Name of the value axis the series is read off, for a measure in other units on a second axis at the end side, such as "margin".string?computed
HiddenStarts with the series hidden: the chart is drawn as if it weren't there, and it keeps its place in the legend, to show it again, and in the data table.boolfalse

Connection lost

Rejoining the server…