Add a line chart to an iOS fitness app that shows daily step counts for the past 30 days.
Build a real-time streaming chart that updates as new sensor or financial data arrives in the app.
Layer a bar chart and a line trend on the same SwiftUI view to show both raw values and averages together.
Display a pie chart breaking down spending categories in a personal finance iOS app.
Requires iOS 13 or later, install via Swift Package Manager in Xcode.
SwiftUICharts is a library for adding charts to iOS apps built with SwiftUI, Apple's modern framework for building app interfaces. If you are an iOS developer and want to display data visually, such as bar charts, line charts, or pie charts, this library provides the components to do it without building them from scratch. The library works by composing chart pieces together using SwiftUI's modifier system, which is the standard way SwiftUI code adds behavior and appearance to views. You attach modifiers to a chart component to set the data, choose colors, configure grid lines, label the axes, and control how the chart responds to touch interaction. Version 2.0 is a major rewrite that replaced an older API style, so if you are migrating from the earlier version, a migration guide is included in the repository. The basic workflow is to place a chart type, such as LineChart or BarChart, inside a layout container, then chain modifiers onto it. You can set data as a simple list of numbers for categorical displays, or as pairs of numbers for charts that represent a continuous range on both axes. Multiple chart types can be layered inside the same container, so you can show bars and a line trend together in one view. Beyond static data, the library supports streaming data sources for charts that update in real time. There is also a performance mode for large data sets that reduces the number of points drawn on screen to keep the app responsive. Interaction is handled through a shared state object or a callback, letting you respond when a user taps or drags across the chart. The library is installed via Swift Package Manager, Apple's built-in dependency tool, and requires iOS 13 or later. An example app is included in the repository to demonstrate all major features.
← apppear on gitmyhub — every repo by this author, as a profile.
Verify against the repo before relying on details.