{"id":13461759,"url":"https://github.com/jordibruin/Swift-Charts-Examples","last_synced_at":"2025-03-24T22:34:56.377Z","repository":{"id":37003885,"uuid":"502727542","full_name":"jordibruin/Swift-Charts-Examples","owner":"jordibruin","description":"An overview of the different types of charts you can make with Swift Charts","archived":false,"fork":false,"pushed_at":"2023-08-01T20:53:04.000Z","size":9860,"stargazers_count":2174,"open_issues_count":16,"forks_count":139,"subscribers_count":29,"default_branch":"main","last_synced_at":"2025-03-24T02:12:59.494Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Swift","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/jordibruin.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null},"funding":{"github":["jordibruin"]}},"created_at":"2022-06-12T21:04:10.000Z","updated_at":"2025-03-23T18:09:32.000Z","dependencies_parsed_at":"2024-01-12T04:01:31.030Z","dependency_job_id":null,"html_url":"https://github.com/jordibruin/Swift-Charts-Examples","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jordibruin%2FSwift-Charts-Examples","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jordibruin%2FSwift-Charts-Examples/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jordibruin%2FSwift-Charts-Examples/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jordibruin%2FSwift-Charts-Examples/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jordibruin","download_url":"https://codeload.github.com/jordibruin/Swift-Charts-Examples/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245366204,"owners_count":20603438,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-07-31T11:00:56.923Z","updated_at":"2025-03-24T22:34:56.345Z","avatar_url":"https://github.com/jordibruin.png","language":"Swift","funding_links":["https://github.com/sponsors/jordibruin"],"categories":["Swift","Misc","Swift UI","Uncategorized"],"sub_categories":["SwiftUI","Uncategorized"],"readme":"# Swift Charts Examples\nThis 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.\n\n\u003cimg width=\"1511\" alt=\"image\" src=\"https://user-images.githubusercontent.com/170948/173253882-1a80b934-a0b9-4acb-a290-a299ae3fdd7d.png\"\u003e\n\n## Todo\n- [ ] Add missing Charts\n- [ ] Multi-language Support\n- [ ] First row, second bar with the lines with blocks in the middle\n- [ ] Sleep stages chart\n- [ ] iPhone battery percentage screen with different colors and overlaid bar\n- [ ] Make all charts (even more) accessible\n\nSee 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.\n\n## How to add a new chart\n\nEach 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).\n\n\u003cimg src=\"images/charts_wwdc_slide.png\"\u003e\nSource: https://developer.apple.com/videos/play/wwdc2022/10137/\n\n\n## Chart Types\n\n### [Apple](https://github.com/jordibruin/SwiftChartExamples/tree/main/Swift%20Charts%20Examples/Charts/AppleCharts)\n\nElectrocardiograms (ECG)\n\n\u003cimg src=\"images/charts/apple/heartBeat.png\" width=\"380\"\u003e\n            \niPhone Storage\n\n\u003cimg src=\"images/charts/apple/oneDimensionalBar.png\" width=\"380\"\u003e\n\nScreen Time\n\n\u003cimg src=\"images/charts/apple/screenTime.png\" width=\"380\"\u003e\n\n### [Line Charts](https://github.com/jordibruin/SwiftChartExamples/tree/main/Swift%20Charts%20Examples/Charts/LineCharts)\n\nLine Chart\n\n\u003cimg src=\"images/charts/line/singleLine.png\" width=\"380\"\u003e\n\nLine Chart with Lollipop\n\n\u003cimg src=\"images/charts/line/singleLineLollipop.png\" width=\"380\"\u003e\n\nAnimating Line\n\n\u003cimg src=\"images/charts/line/animatingLine.png\" width=\"380\"\u003e\n\nLine with changing gradient\n\n\u003cimg src=\"images/charts/line/gradientLine.png\" width=\"380\"\u003e\n\nLine Charts\n\n\u003cimg src=\"images/charts/line/multiLine.png\" width=\"380\"\u003e\n\nLine Point\n\n\u003cimg src=\"images/charts/line/linePoint.png\" width=\"380\"\u003e\n\n### [Bar Charts](https://github.com/jordibruin/SwiftChartExamples/tree/main/Swift%20Charts%20Examples/Charts/BarCharts)\n\nSingle Bar\n\n\u003cimg src=\"images/charts/bar/singleBar.png\" width=\"380\"\u003e\n\nSingle Bar with Threshold Rule Mark\n\n\u003cimg src=\"images/charts/bar/singleBarThreshold.png\" width=\"380\"\u003e\n\nTwo Bars\n\n\u003cimg src=\"images/charts/bar/twoBars.png\" width=\"380\"\u003e\n\nPyramid\n\n\u003cimg src=\"images/charts/bar/pyramid.png\" width=\"380\"\u003e\n\nTime Sheet Bar\n\n\u003cimg src=\"images/charts/bar/timeSheetBar.png\" width=\"380\"\u003e\n\nSound Bar\n\n\u003cimg src=\"images/charts/bar/soundBar.png\" width=\"380\"\u003e\n\nHorizontal Scrolling Bar Chart\n\n\u003cimg src=\"images/charts/bar/scrollingBar.png\" width=\"380\"\u003e\n\n### [Area Charts](https://github.com/jordibruin/SwiftChartExamples/tree/main/Swift%20Charts%20Examples/Charts/AreaCharts)\n\nArea Chart\n\n\u003cimg src=\"images/charts/area/areaSimple.png\" width=\"380\"\u003e\n\nStacked Area Chart\n\n\u003cimg src=\"images/charts/area/stackedArea.png\" width=\"380\"\u003e\n\n### [Range Charts](https://github.com/jordibruin/SwiftChartExamples/tree/main/Swift%20Charts%20Examples/Charts/RangeCharts)\n\nRange Chart\n\n\u003cimg src=\"images/charts/range/rangeSimple.png\" width=\"380\"\u003e\n\nHeart Rate Range Chart\n\n\u003cimg src=\"images/charts/range/rangeHeartRate.png\" width=\"380\"\u003e\n\nCandle Stick Chart\n\n\u003cimg src=\"images/charts/range/candleStick.png\" width=\"380\"\u003e\n\n### [Heat Maps](https://github.com/jordibruin/SwiftChartExamples/tree/main/Swift%20Charts%20Examples/Charts/HeatMap)\n\nCustomizable Heat Map\n\n\u003cimg src=\"images/charts/heatMap/customizeableHeatMap.png\" width=\"380\"\u003e\n\nGitHub Contributions Graph\n\n\u003cimg src=\"images/charts/heatMap/gitContributions.png\" width=\"380\"\u003e\n\n### [Point Charts](https://github.com/jordibruin/SwiftChartExamples/tree/main/Swift%20Charts%20Examples/Charts/PointCharts)\n\nScatter Chart\n\n\u003cimg src=\"images/charts/point/scatter.png\" width=\"380\"\u003e\n\nVector Field\n\n\u003cimg src=\"images/charts/point/vectorField.png\" width=\"380\"\u003e\n\n## Other Example Repos\nCheck out my other example repos\n\n[🪧 TipKit](https://github.com/jordibruin/TipKit-Examples)\n\n[🏝️ Dynamic Island](https://github.com/jordibruin/Dynamic-Islands)\n\n[🥽 visionOS](https://github.com/jordibruin/visionOS-Examples)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjordibruin%2FSwift-Charts-Examples","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjordibruin%2FSwift-Charts-Examples","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjordibruin%2FSwift-Charts-Examples/lists"}