suiss/ui · Chart
Line Chart Goal
Daily step counts plotted against a labeled dashed goal line at 10,000 steps.
Line Chart Goal 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.
Daily steps as a line with dots, plotted against a labeled dashed goal line. Use it when a single target gives the values their meaning, such as quotas, budgets or fitness goals.
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-goal.tsx:
- Update the import paths to match your project.
Usage
Replace chartData and set GOAL to your target. Change the label text on the ReferenceLine and the unit in the tooltip formatter and axis tickFormatter to match your metric.
Notes
The value axis scales to the data only, so a goal far above or below every value may fall outside the plot; set a domain on the axis if that can happen. Focus the chart and use the arrow keys to step through the days.

Seven days of steps drawn as a monotone line with dots, a value axis in thousands on the right and a labeled dashed ReferenceLine at GOAL. The tooltip formats the count with thousands separators.
Installation
The CLI also adds what it builds on: Card, Chart, Text.
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 daily values and set GOAL. The component takes no props.
