suiss/ui · Chart
Line Chart Linear
A single line drawn with straight segments between readings instead of a smoothed curve.
Line Chart Linear 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.
One series joined by straight segments instead of a smoothed curve. Prefer it to the default when smoothing would imply values between readings that were never measured.
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-linear.tsx:
- Update the import paths to match your project.
Usage
Replace chartData, update each dataKey and set the label and color in chartConfig. Everything else matches the default line chart.
Notes
Keyboard users can focus the chart and move between points with the arrow keys.

One series with type="linear", so each month connects to the next with a straight segment. It has a month axis, a dashed grid and a tooltip.
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. Set the label and color in chartConfig. The component takes no props.
