suiss/ui · Chart
Area Chart Stacked Expand
Two stacked areas normalized so every month fills 100%, showing each series' share rather than its value.
Area Chart Stacked Expand is an open-source chart from suiss/ui for React, React Native, SwiftUI and Jetpack Compose. The @esuiss/ui CLI copies its source into your project, so you own the code.
Two stacked areas stretched so every month fills the full height, turning absolute numbers into shares. Pick it over the regular stacked chart when the split between series matters more than the total.
Installation
CLI
Works in any project with a components.json. See Installation for the one-line registry setup. Or use the suiss/ui CLI:
Manual
- Install the dependencies:
-
Copy the source into
components/charts/area-chart-stacked-expand.tsx:
- Update the import paths to match your project.
Usage
Replace chartData and rename the series keys consistently in the data, the areas and chartConfig. Every series must share the same stackId to be normalized together. The right-hand axis is already formatted as percentages.
Notes
The tooltip shows the original values, not percentages; add a tooltip formatter if readers need the share. Focus the plot and use the arrow keys to move the tooltip between months.

Desktop and mobile areas share one stack with stackOffset="expand", so the chart shows the proportion of each series rather than raw totals. A value axis on the right reads 0%, 50% and 100%, and the tooltip lists both series.
Installation
The CLI also adds what it builds on: Card, Chart.
Manual
-
Target iOS 17 or later.
-
Copy the theme files every view uses:
- Copy the source and every file it uses:
- Add the files to your app target.
- Set
minSdkto 24 or higher and add the dependencies:
- Copy the theme files every view uses:
- Copy the source and every file it uses:
- Update the
com.esuiss.uipackage names to match your project.
Usage
Replace chartData with your records and change each dataKey to match your fields. Rename the series or change their colors in chartConfig. The component takes no props.
