Skip to main content
Urbicon UI

AreaChartbeta

Area chart for trends with volume emphasis — filled regions, optionally stacked.

Playground

  • New
  • Returning
Area chart: 6 points, 2 series
CategoryNewReturning
Jan46
Feb73
Mar58
Apr95
May127
Jun109
<script lang="ts">
  import { AreaChart } from '@urbicon-ui/blocks';

  const data = [
    { label: 'Jan', values: [4, 6] },
    { label: 'Feb', values: [7, 3] },
    { label: 'Mar', values: [5, 8] },
    { label: 'Apr', values: [9, 5] },
    { label: 'May', values: [12, 7] },
    { label: 'Jun', values: [10, 9] }
  ];
  const series = [{ label: 'New' }, { label: 'Returning' }];
</script>

<AreaChart
  {data}
  {series}
  fillOpacity={0.2}
  height={260}
/>

01 Examples

Single area

A filled region under one series, anchored to the zero baseline — good for cumulative volume at a glance.
Area chart: 6 points
CategorySeries 1
W120
W232
W328
W444
W552
W648
<div class="w-full max-w-2xl">
  <AreaChart data={single} />
</div>

Stacked

stacked accumulates series into bands, so the top edge reads as the total while each band shows its contribution.
  • New
  • Returning
Area chart: 5 points, 2 series, stacked
CategoryNewReturning
Jan46
Feb73
Mar58
Apr95
May127
<div class="w-full max-w-2xl">
  <AreaChart stacked data={signups} series={channels} />
</div>

Overlaid

Without stacked, series overlay with a translucent fill so you can compare their shapes directly.
  • New
  • Returning
Area chart: 5 points, 2 series
CategoryNewReturning
Jan46
Feb73
Mar58
Apr95
May127
<div class="w-full max-w-2xl">
  <AreaChart data={signups} series={channels} />
</div>

02 Customization

Fill opacity + colors

Tune fillOpacity and set per-series colors to match a brand or emphasise one band.
  • New
  • Returning
Area chart: 5 points, 2 series
CategoryNewReturning
Jan46
Feb73
Mar58
Apr95
May127
<div class="w-full max-w-2xl">
  <AreaChart
    fillOpacity={0.35}
    data={signups}
    series={[
      { label: 'New', color: 'var(--color-primary)' },
      { label: 'Returning', color: 'var(--color-secondary)' }
    ]}
  />
</div>

03 Accessibility

SVG with role="img"

The SVG carries role="img" with a generated aria-label that also notes when the chart is stacked.

Data-table fallback

A visually hidden table mirrors every value per series so the filled regions are never the only way to read the data.

04 API Reference

17 props
17 props 1 required
Prop
Type
Default
Description

05 Types

Local type definitions used by this component.

6 types
Name
Kind
Category
Used by
Description

06 Installation

Import

import { AreaChart } from '@urbicon-ui/blocks';