Swift Charts

Beautiful, accessible charts built the same way you build the rest of your UI.

Introduced
2022
WWDC22
Kind
Framework
Runs on
Get it from
iOS
16.0+
iPadOS
16.0+
Mac Catalyst
16.0+
macOS
13.0+
tvOS
16.0+
visionOS
1.0+
watchOS
9.0+
Works in Swift Playground ›
A week of steps as a bar chart, with axes and gridlines drawn for you.

Overview

Swift Charts describes a chart as a set of marks: bars, lines, points, areas, rules. You combine them like SwiftUI views and the framework handles axes, scales, legends and animation.

Charts adapt to Dark Mode, Dynamic Type and every platform, and come with VoiceOver support, including Audio Graphs, built in.

Marks

BarMark, LineMark, PointMark, AreaMark, RuleMark, RectangleMark and SectorMark.

Composition

Layer marks in one chart, just like stacking SwiftUI views.

Interactivity

Selection and scrolling with a single modifier.

Accessible by default

VoiceOver descriptions and Audio Graphs come with every chart.

StepsChart.swift
import Charts import SwiftUI struct StepsChart: View { let days: [Day] var body: some View { Chart(days) { day in BarMark( x: .value("Day", day.date, unit: .day), y: .value("Steps", day.steps) ) } } }

History

How it grew up.

2022

Introduced

Hello Swift Charts at WWDC22.

2023

Pie charts and selection

SectorMark for pie and donut charts, plus selection and scrolling.

2024

Function plots

Plot mathematical functions and large data sets efficiently.

2025

3D charts

Chart3D brings charts into the third dimension.