suiss/ui · Chart
Line Chart Step
A single line drawn as horizontal steps, holding each value until the next reading.
Line Chart Step 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.
A single line drawn as flat steps that hold each value until the next reading. It fits values that change in discrete jumps, like prices, plan tiers or headcount.
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-step.tsx:
- Update the import paths to match your project.
Usage
Replace chartData, point each dataKey at your fields and set the label and color in chartConfig. Use stepAfter or stepBefore as the curve type to move where each jump happens.
Notes
The tooltip follows the cursor, or the arrow keys once the chart has focus.

One series with type="step", which draws flat runs and vertical jumps instead of slopes. Use it for values that change at discrete moments. 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.
