I am working on a swift chart feature that allows users to “scrub” through it in order to view more detailed information about a data point. Implementation is the same as in this wwdc 2023 video
In essence I added .chartXSelection(value: $selectedDate)
modifier to my chart and am rendering RuleMark
conditionally based on selectedDate
.
It all works, but I am able to go “beyond my chart” as shown in preview below. And am difficulty figuring out how to disable this behavior.