swiftuiios16swiftui-charts

How do change chartYvalues?


Please tell me how to change these values? I need a chart that will display price changes. Since the spread is small I want to make a zoom, for example from 18.0 to 20.0. How do I change this?

This values.


Solution

  • You use the .chartYScale modifier:

    Chart {
        //your chart stuff here
    }
    .chartYScale(domain: 18...20)