What’s new in Swift Charts in iOS 18?

Asked on 07/30/2024

1 search

In iOS 18, Swift Charts introduces several new features and improvements:

  1. Function Plots: Swift Charts now allows you to visualize mathematical functions in your apps. This includes:

    • Line Plot: For visualizing a single function.
    • Area Plot: To fill in the area between two functions.
    • Parametric Functions: You can graph parametric functions where x and y are defined in terms of a third variable, t.
    • Piecewise Functions: Swift Charts can handle piecewise functions, including cases where certain values in the domain do not have an output.
  2. Vectorized Plotting APIs: These new APIs support visualizing larger datasets more efficiently, making your charts more performant.

  3. Accessibility: Swift Charts ensures that data visualizations are accessible by default, including support for VoiceOver to describe the chart.

For a detailed walkthrough of these new features, you can watch the session Swift Charts: Vectorized and function plots starting at 00:12:37.