How can I get SwiftUI Chart to display a daily average vs the sum if I were using .weekOfYear as the unit for BarMark? For example, instead of displaying the total number of steps in a week, I'd like to show the daily average for that week.
Chart {
ForEach(stats, id: \.time) { stat in
BarMark(
x: .value("Time", stat.time, unit: .weekOfYear),
y: .value("Steps", stat.value)
)
}
}