Skip to main content
WireKit
Copy for LLM

Area

Area charts are line charts with the region under the line filled — visually emphasizing the magnitude of the trend. WireKit's type="area" produces a Chart.js line chart with fill: 'origin' set on every dataset; the WireKit theming layer auto-tints the fill at 12% opacity.

When to use area charts

When the cumulative value matters as much as the trend shape — disk usage growth, ARR composition, traffic-volume context. For pure trend tracking use line charts; for proportional comparisons over the same baseline use stacked bar.

Basic Example — Disk usage over 30 days

Server disk usage trend (GB)

Stacked — ARR composition by plan

ARR composition: Starter / Growth / Enterprise (€K)

Real-world recipe — Cumulative signups

@php
    $signups = \App\Models\User::query()
        ->selectRaw('DATE(created_at) as day, COUNT(*) as count')
        ->where('created_at', '>=', now()->subDays(30))
        ->groupBy('day')
        ->orderBy('day')
        ->pluck('count', 'day');

    // Cumulative running total — the area visualizes the lifetime-signup curve.
    $cumulative = [];
    $running = 0;
    foreach ($signups as $count) {
        $running += $count;
        $cumulative[] = $running;
    }
@endphp

<x-wirekit-chart
    type="area"
    :labels="$signups->keys()->all()"
    :datasets="[['label' => 'Cumulative signups', 'data' => $cumulative]]"
    height="280px"
/>

See Also

Design Tokens

See Chart.js adapter — Design Tokens for the color, typography, and grid tokens shared across every Chart.js demo.