Swift Charts Zoom

Is there a way to "zoom" a swift line chart with a gesture? For example like you zoom in and out in Maps. In this case you would would be changing the x or y axis scale as you pinch in or out.

How do you set up you x/y axis scale ?

You can use .chartYScale() and .chartXScale() for that. You can pass parameters for the scale.

Here is a link to some of the Apple documentation for those.

[https://developer.apple.com/documentation/swiftui/view-chart-view]

Swift Charts Zoom
 
 
Q