Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/jordibruin/Swift-Charts-Examples
An overview of the different types of charts you can make with Swift Charts
https://github.com/jordibruin/Swift-Charts-Examples
Last synced: 2 months ago
JSON representation
An overview of the different types of charts you can make with Swift Charts
- Host: GitHub
- URL: https://github.com/jordibruin/Swift-Charts-Examples
- Owner: jordibruin
- License: mit
- Created: 2022-06-12T21:04:10.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2023-08-01T20:53:04.000Z (over 1 year ago)
- Last Synced: 2024-10-14T20:10:59.643Z (3 months ago)
- Language: Swift
- Size: 9.4 MB
- Stars: 2,049
- Watchers: 29
- Forks: 128
- Open Issues: 15
-
Metadata Files:
- Readme: README.md
- Funding: .github/FUNDING.yml
- License: LICENSE
Awesome Lists containing this project
- awesome-ios - Swift-Charts-Examples
- fucking-open-source-ios-apps - Swift Charts Examples
- awesome-swift-charts - Swift Charts Examples
- awesome-swift-charts - Swift Charts Examples
README
# Swift Charts Examples
This repo aims to provide sample code for lots of different chart types for you to use as inspiration for your own projects. We start by recreating the sample charts Apple uses in their sessions related to Swift Charts. The goal is to make each chart type customizable, accessible and flexible so that you can easily change it to your needs.## Todo
- [ ] Add missing Charts
- [ ] Multi-language Support
- [ ] First row, second bar with the lines with blocks in the middle
- [ ] Sleep stages chart
- [ ] iPhone battery percentage screen with different colors and overlaid bar
- [ ] Make all charts (even more) accessibleSee the [open issues](https://github.com/jordibruin/SwiftChartExamples/issues) if you think anything is missing from this list. You can also contact me on [Twitter](https://www.twitter.com/jordibruin) if you have any suggestions or feedback.
## How to add a new chart
Each chart needs a preview chart as well as a detail view. The preview chart is used in the home screen of the app for easier navigation. Look at the Simple Line Chart code to see what the format should be for the preview charts. On the detail view, make sure you add some customisation options in a separate section from the chart. If you have any questions feel free to create an [issue](https://github.com/jordibruin/SwiftChartExamples/issues).
Source: https://developer.apple.com/videos/play/wwdc2022/10137/## Chart Types
### [Apple](https://github.com/jordibruin/SwiftChartExamples/tree/main/Swift%20Charts%20Examples/Charts/AppleCharts)
Electrocardiograms (ECG)
iPhone StorageScreen Time
### [Line Charts](https://github.com/jordibruin/SwiftChartExamples/tree/main/Swift%20Charts%20Examples/Charts/LineCharts)
Line Chart
Line Chart with Lollipop
Animating Line
Line with changing gradient
Line Charts
Line Point
### [Bar Charts](https://github.com/jordibruin/SwiftChartExamples/tree/main/Swift%20Charts%20Examples/Charts/BarCharts)
Single Bar
Single Bar with Threshold Rule Mark
Two Bars
Pyramid
Time Sheet Bar
Sound Bar
Horizontal Scrolling Bar Chart
### [Area Charts](https://github.com/jordibruin/SwiftChartExamples/tree/main/Swift%20Charts%20Examples/Charts/AreaCharts)
Area Chart
Stacked Area Chart
### [Range Charts](https://github.com/jordibruin/SwiftChartExamples/tree/main/Swift%20Charts%20Examples/Charts/RangeCharts)
Range Chart
Heart Rate Range Chart
Candle Stick Chart
### [Heat Maps](https://github.com/jordibruin/SwiftChartExamples/tree/main/Swift%20Charts%20Examples/Charts/HeatMap)
Customizable Heat Map
GitHub Contributions Graph
### [Point Charts](https://github.com/jordibruin/SwiftChartExamples/tree/main/Swift%20Charts%20Examples/Charts/PointCharts)
Scatter Chart
Vector Field
## Other Example Repos
Check out my other example repos[🪧 TipKit](https://github.com/jordibruin/TipKit-Examples)
[🏝️ Dynamic Island](https://github.com/jordibruin/Dynamic-Islands)
[🥽 visionOS](https://github.com/jordibruin/visionOS-Examples)