Skip to content
IzzyBlazor

Enter all results ↑ ↓ move Esc close

Area chart

Since 0.1.0-alpha.22
Shows a total over time as filled areas, stacked to show each part of the whole.

Use an area chart when the size of a total over time matters, such as visits by channel. Stacked areas show the total and how it splits. Only the bottom layer reads exactly, because the others sit on a moving base. To compare the parts, use a line chart.

Stacked areas

ChartAreaSeries in a Chart fills the area under each item's Value. Stacked with Stacking, the series show a total over time and how it divides: the top edge is all visits, and each band one channel's part.

Static

Preview

Visits by channel, 2026
  • Search
  • Direct
  • Social
  • Email
Arrow keys move between values; Escape hides the tooltip.

Code

Usage.razor
@* Visits by channel each month, stacked: the top edge is the total, and each band its channel's part. *@
<Chart Items="_months" Argument="m => m.Month" Title="Visits by channel, 2026" Stacking="ChartStacking.Normal">
    <ChartValueAxis Format="#,##0,K" />
    <ChartAreaSeries Value="m => m.Search" Name="Search" />
    <ChartAreaSeries Value="m => m.Direct" Name="Direct" />
    <ChartAreaSeries Value="m => m.Social" Name="Social" />
    <ChartAreaSeries Value="m => m.Email" Name="Email" />
</Chart>

@code {
    private record ChannelMonth(DateOnly Month, int Search, int Direct, int Social, int Email);

    private readonly ChannelMonth[] _months =
    [
        new(new(2026, 1, 1), 148_000, 92_000, 41_000, 18_000),
        new(new(2026, 2, 1), 141_000, 88_000, 44_000, 21_000),
        new(new(2026, 3, 1), 156_000, 95_000, 52_000, 19_000),
        new(new(2026, 4, 1), 162_000, 97_000, 49_000, 23_000),
        new(new(2026, 5, 1), 171_000, 101_000, 58_000, 22_000),
        new(new(2026, 6, 1), 165_000, 99_000, 63_000, 26_000),
        new(new(2026, 7, 1), 158_000, 94_000, 71_000, 24_000),
        new(new(2026, 8, 1), 152_000, 90_000, 68_000, 21_000),
        new(new(2026, 9, 1), 174_000, 104_000, 62_000, 28_000),
        new(new(2026, 10, 1), 183_000, 109_000, 66_000, 31_000),
    ];
}

Add this example to a page with the izzy CLI:

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

Put the largest, steadiest part at the bottom, where its edge is straight and easiest to read.

Everything on the Chart page works with every series type.

Details

The chart's Stacking stacks area series, so the parts add up to the whole, such as visits by channel.

Mode support

What works in each mode, Area chart
FeatureStaticInteractive
Areas over dates, numbers or names, straight, smooth or steppedYesYes
Stacked, or stacked to 100%YesYes
Drawn on the server, as wide as its container, with labels that thin out as it narrowsYesYes
A table of the values behind a "Show data" buttonYesYes
Tooltips on hover and from the keyboardYesYes
Legend items that hide and show a seriesYesYes

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.

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

Parameters

ChartAreaSeries parameters
PropTypeDefault
LineStyleHow the area's line is drawn.ChartLineStyle?computed
CurveThe area's shape between values.ChartCurveChartCurve.Straight
MarkersWhether each value is marked.bool?computed
ConnectGapsDraws the area straight across a missing value, instead of leaving a gap.boolfalse
EndLabelWrites the series' name just past the plot's end, level with its last value (the top of its stack, when stacked), in its color: the reader names the line where it ends, without looking across to a legend.boolfalse
ValueThe value to draw, such as m => m.Revenue: any number, or null for none.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…