Appica UIUI 1.6.0

Area Chart

An area chart recipe - Recharts drawn with Appica UI tokens, for a volume that changes over time.

An area chart shows how a volume changes over time, with a fill under the line. Like every chart here it is a recipe: Recharts draws it and the chart layer themes it. Each example below is a complete file to paste and adapt.

Installation

Recharts is the only extra dependency, with react-is at the same version as react:

pnpm add recharts react-is

The examples import the chart layer from @/components/chart. If your project doesn't have it yet, copy it from the Charts page first.

Examples

Default

1 series in the first series color, filled with a gradient from the -soft tint to transparent. The gradient's id comes from useId, so 2 charts on a page never share one.

Loading

Stacked

Give every Area the same stackId to stack parts of a whole. Stacked areas take a flat -soft fill of their own color instead of a gradient, and a Legend names them.

Loading

Comparison

The previous period is the same color, dashed, at 60% stroke opacity and with no fill. That way it reads as the same measure at another time, where a second color would suggest a second series.

Loading

Forecast

An Area whose dataKey holds a [low, high] pair draws a range band. Here it sits in a ComposedChart behind a solid line for the actual values and a dashed one for the forecast. The tooltip prints the pair as a range.

Loading

Step

type="stepAfter" holds each value until the next one, for a measure that changes in jumps: seats, a price, a stock level.

Loading

Accessibility

  • Pass aria-label to the chart with what it shows ("Revenue by month"). It becomes the accessible name of the SVG.
  • The chart takes focus, and the left and right arrow keys move the tooltip from point to point.
  • A chart with 2 or more areas has a Legend, and the tooltip names every series, so color is never the only cue.
  • Nothing animates under reduced motion.

© 2026 Appica UI. A free component library, crafted by the Appica team.