Reading time: 2 min
This recipe shows a more advanced SwiftUI bar chart that shows min, max and average for each data point. The end result looks like this:
Charts framework is available starting in SwiftUI 4 (iOS 16, macOS 12.4).
Let's start off by creating a simple structure that represent air tempera...
Styling SwiftUI Chart with Charts Framework
Reading time: 3 min
This recipe shows how to add a style SwiftUI Charts using Apple's new Charts Framework. You can change the colors, line styles and visibility of all parts of the chart, including its plot area, marks and axes. The end result looks like this:
Charts framework is available starting in S...
SwiftUI Charts - Converting AxisValue to Text
Reading time: 1 min
This quick recipe shows how to convert AxisValue
to a Text
using Apple's new Charts Framework. The end result looks like this:
Charts framework is available starting in SwiftUI 4 (iOS 16, macOS 12.4).
When you construct X or Y axis in SwiftUI charts using chartXAxis
or chartYAx...
Reading time: 4 min
This recipe shows how to add a Scan Line / Lollipop to a Chart to SwiftUI using Apple's new Charts Framework. It allows you to read data from the chart depending on its position using tap and drag gestures. The end result looks like this:
Charts framework is available starting in SwiftU...
Scatter Plot in SwiftUI with Charts Framework
Reading time: 2 min
This recipe shows how to add a Scatter Plot Chart to SwiftUI using Apple's new Charts Framework. The end result looks like this:
Charts framework is available starting in SwiftUI 4 (iOS 16, macOS 12.4).
Let's start off by creating a simple structure that represents how many calories...