Sample code demonstrating Learn how to create beautiful, interactive charts in SwiftUI using Apple's Swift Charts framework, from simple line charts to customized bar graphs..
This project accompanies the article: Getting Started with Swift Charts
- Xcode 26.2+
- iOS 26.0+
- macOS 26.0+
- Swift 6.0
- Clone this repository
- Run
xcodegen generate(requires XcodeGen) - Open
SwiftChartsBasics.xcodeproj - Build and run
- App.swift: Source file
- ContentView.swift: Source file
- Models.swift: Source file
- SalesChartView.swift: Source file
- MultipleMarksView.swift: Source file
- CombinedMarksView.swift: Source file
- MultiSeriesChartView.swift: Source file
- StyledChartView.swift: Source file
- TimeSeriesChartView.swift: Source file
- InteractiveChartView.swift: Source file
- ChartWithReferenceLineView.swift: Source file
- AccessibleChartView.swift: Source file
Read the full article at BleepingSwift for detailed explanations and additional examples.
MIT License - see LICENSE for details.