suiss/ui · Chart
Line Chart Multiple
Two lines compared on the same axes, with a legend identifying each series.
Line Chart Multiple 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 series as smooth lines on shared axes, with a legend below. Use it to compare how two metrics move over the same period.
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/line-chart-multiple.tsx:
- Update the import paths to match your project.
Usage
Replace chartData and rename the series keys in the data, both Line elements and chartConfig. Add another Line with its own config entry for more series; the legend and tooltip pick them up automatically.
Notes
Beyond four or five lines the chart gets hard to read; consider the interactive variant that lets readers toggle series.

Desktop and mobile series drawn as monotone lines on the same axis. A legend below the plot names both series, and the tooltip lists each value for the touched month.
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. Add a Line and a chartConfig entry for each extra series; the legend picks them up. The component takes no props.
