Skip to content
CHARTS · COMPLETE

AreaChart

Show totals and shares at a glance with stacked, percent or overlapping areas.

Show totals and shares at a glance with stacked, percent or overlapping areas.

Why it helps

  • Stacked, percent or overlay
  • Easy-to-read totals
  • Clickable legend

Where it fits

  • Composition over time
  • Cumulative values
  • Market share

Example

<Select TValue="AreaMode" @bind-Value="_mode" Items="_modes" Label="Mode" />
<AreaChart Label="Visits by channel" Mode="_mode" Categories="_months" Series="_series" ValueFormat="#,0" />

@code {
    private AreaMode _mode = AreaMode.Stacked;
    private readonly AreaMode[] _modes = [AreaMode.Stacked, AreaMode.Percent, AreaMode.Overlay];
    private readonly string[] _months = ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug"];
    private readonly ChartSeries[] _series =
    [
        new("Search", [320, 340, 390, 420, 410, 470, 520, 540]),
        new("Direct", [210, 220, 215, 240, 260, 255, 280, 300]),
        new("Social", [90, 120, 160, 150, 210, 230, 220, 260]),
        new("Email", [60, 55, 70, 80, 75, 95, 100, 120])
    ];
}

A short fragment. Add @using RayCraft.Blazor.Components to your page and use an interactive render mode.

Part of RayCraft Complete.

All controls ยท Documentation