I have the same problem. Tried to apply a custom conditional modifier to apply chartScrollableAxes(.horizontal) only when there is no X selection, but that works as it should - just fitting all the chart content into a visible chart area when I select a value with a tap gesture. And when I lift my finger, it makes the chart scrollable again changing X axis scale to the initial state.
Apple engineers, could you please tell us whether it's possible or not to make a chart scrollable horizontally and show a RuleMark annotation above the chart at the same time? The same way Apple Health app works on Steps chart. It seems like public API available to us doesn't work the same way.
Topic:
UI Frameworks
SubTopic:
SwiftUI
Tags: