I have not tried it, so I can't say if it works in your case.
You could try to use chartOverlay as described in doc, and use it to get in a State var where you tapped and then move to the view according to this known tap point.:
Chart(data) {
LineMark(
x: .value("date", $0.date),
y: .value("price", $0.price)
)
}
.chartOverlay { proxy in
GeometryReader { geometry in
Rectangle().fill(.clear).contentShape(Rectangle())
.gesture(
DragGesture()
.onChanged { value in
// Convert the gesture location to the coordinate space of the plot area.
let origin = geometry[proxy.plotAreaFrame].origin
let location = CGPoint(
x: value.location.x - origin.x,
y: value.location.y - origin.y
)
// Get the x (date) and y (price) value from the location.
let (date, price) = proxy.value(at: location, as: (Date, Double).self)
print("Location: \(date), \(price)")
}
)
}
}
Another tutorial here:
https://swiftwithmajid.com/2023/02/06/mastering-charts-in-swiftui-interactions/
Hope that can help.