SwiftUI Charts for WidgetKit
Learn how to use SwiftUI to create a series of different charts, and then how to use WidgetKit to display them on a user’s home screen. By Jessy Catterwaul.
Who is this for?
This course is for developers who are familiar with SwiftUI, but haven’t gotten experience using it to create charts, or widgets.
Covered concepts
- WidgetKit
- Charts
- Shapes
Part 1: SwiftUI Charts for WidgetKit
Use a bar chart to graph precipitation in a region in the Smoky Mountains across the timespan of a year.
Use a bar chart to graph snowfall in a region in the Smoky Mountains across the timespan of a year.
A heat map graphically represents values using colors, such as purple and blue shades for low temperatures; yellow, orange and red for warmer temperatures.
Create a WidgetKit extension and customize the Apple-provided boilerplate code in order to get your chart into a widget!
Widgets can support up to three sizes. Use the widget extension code, along with a refactoring of your app code, in order to handle the right ones.