Visualizations

Area Chart

Sorting in area charts is usually based on the x-axis, such as time or categories. Sorting helps ensure that the areas are plotted in a logical progression.

Loading...

Installation

Install the component via the CLI in one command.

npx shadcn@latest add @intentui/area-chart

Composed components

When you install this component via the CLI, it automatically loads all composed components, so you don’t need to add them individually.

Manual installation

Use this approach if you prefer to install and wire up the component yourself instead of using the CLI.

npm install recharts react-aria-components

Examples

Monotone

Monotone charts use a smooth curve for a cleaner look. Good when you only need to show one metric clearly without visual clutter.

Loading...

Custom format

Customize the look of your chart to match your design system. You can change colors, styles, and anything else that matters for your UI.

Loading...

Custom tooltip

Add context when users hover. Custom tooltips let you show extra info like icons, units, or anything else that makes your data easier to read.

Loading...

Custom legend

Replace the default legend with something more useful. Add icons, labels, or even interactions to better explain what’s on the chart.

Loading...

Custom colors

Customize the colors of your area chart to match your brand or design system. This helps maintain visual consistency across your application.

Loading...

Controlled

Manage the chart fully with state. Use this to sync with other UI, switch datasets, or respond to user interactions programmatically.

Loading...

Component API

The AreaChart component renders continuous data trends with filled areas.

PropTypeDefault
areaPropsPartial<ComponentProps<typeof Area>>-
cartesianGridPropsCartesianGridProps-
chartPropsOmit<ComponentProps<typeof AreaChartPrimitive>, "data" | "stackOffset">-
childrenReact.ReactNode-
classNamestring-
colorsreadonly (ChartColorKeys | string)[]DEFAULT_COLORS
configChartConfig-
connectNullsbooleanfalse
containerHeightnumber370 desktop / 200 mobile
dataRecord<string, any>[][]
dataKeystring-
displayEdgeLabelsOnlybooleanfalse
fillType"gradient" | "solid" | "none"gradient
hideGridLinesbooleanfalse
hideXAxisbooleanfalse
hideYAxisbooleanfalse
intervalTypeIntervalTypeequidistantPreserveStart
layoutChartLayouthorizontal
legendLegendContentType | booleantrue
legendPropsOmit<ComponentProps<typeof LegendPrimitive>, "content" | "ref">-
tooltipTooltipContentType<ValueType, NameType> | booleantrue
tooltipPropsBaseChartProps["tooltipProps"]-
typeChartTypedefault
valueFormatter(value: number) => string(value) => value.toString()
xAxisPropsXAxisPropsPrimitive-
yAxisPropsYAxisPrimitiveProps-

See the Recharts for the full API reference.

Unlock the full power of
Intent UI Design

Build modern web apps faster with 1000+ resources across components, blocks, patterns, templates, and starter kits.

Learn more