I came up with a simple solution consisting in just setting the Y (or X) axes scale manually in this way (added chartXScale also, as sometimes I have experienced the same issue also with X axis domain):
Chart {
// Chart implementation
}
.chartYScale(domain: 0...50)
.chartXScale(domain: 0...25)
In this way you can prevent the jump to happen.
Topic:
UI Frameworks
SubTopic:
SwiftUI
Tags: