Hi,
I've just started playing with swiftUI and the charts framework myself.
I copied your code verbatim, into a brand new project and it seems to be fine:
I did remove the axis labels to check if it made a difference and it still looks fine without them:
var body: some View {
GroupBox(label: Text("Daily Max Reps")) {
Chart(exerciseMaxRepsArray) { e in
LineMark(x: .value("Date", e.dateCompleted, unit: .day),
y: .value("Reps", e.reps))
}
}
}
This is with a brand new project with nothing but your code.
It seems strange that your axis's seem so wrong in the screenshot with the provided code.
Not sure if that helps, but wishing you the best of luck.
Topic:
UI Frameworks
SubTopic:
SwiftUI
Tags: