Interactive SwiftUI Chart - Drag to Show Data w/ Animation @seanallen
Interactive SwiftUI Chart - Drag to Show Data w/ Animation  @seanallen
Uploaded December 2024 | Updated September 2026, 12 hours ago
Go to squarespace.com/seanallen to save 10% off your first purchase of a website or domain using code SEANALLEN.

In this video I show you how to use add interactivity to a chart using the Swift Charts framework with some nice animations. This allows your user to drag along the chart and show the selected information in an annotation view above the chart. We add an opacity animation so all other bars are faded out and only the selected one remains for a nice touch.

Starter Project Download:
dropbox.com/scl/fo/vpjpxxsnoxxb1f81kkgf8/AG2Xj6QU6TT-CygIxvZ6arc?rlkey=qwwueryssnyo18zkb7xkyvvpr&st=k0gasddt&dl=0

My Basic Bar Chart Video Tutorial:
youtu.be/4utsyqhnS4g

My iOS Dev Courses:
seanallen.teachable.com/?video=uloAs9tQIcA

My Source Code:
seanallen.teachable.com/p/source-code-youtube-videos?video=uloAs9tQIcA

X (Twitter):
Sean Allen - twitter.com/seanallen_dev

Hired.com:
hired.com/x/1n01g

Book and learning recommendations that help out the channel if you decide to purchase (Affiliate Links):

Antoine Van Der Lee - Going Indie Course:
courses.avanderlee.com/p/from-side-project-to-going-indie?affcode=2082304_o9res6rn

Helm (25% Discount) - The all-in-one macOS app that enhances App Store Connect, supercharging your app updates, localization, and ASO with AI-powered tools.
gumroad.com/a/692357651/ymbbmh

Mark Moeyken’s SwiftUI Books:
bigmountainstudio.com/a/fzc51

Paul Hudson's Hacking With Swift:
gumroad.com/a/762098803

RocketSim - Enhance Your Xcode Simulator:
gumroad.com/a/51797971/ftvbh

Objc.io Books (Thinking in SwiftUI & Advanced Swift):
gumroad.com/a/656585843

Timestamps:
0:00 - Interactive Chart Example
0:17 - Starter Project Explanation
0:48 - Interactivity - chartXSelection Modifier
2:51 - Matching data to selection
6:28 - Building the UI based on selection
7:00 - Bars fade in and out based on selection
10:06 - Lolli-pop annotation view UI

#swift #softwaredeveloper #iosdeveloper
Interactive SwiftUI Chart - Drag to Show Data w/ AnimationWWDC, Apple Design Awards, Mentorship, Slow the F Down, Liquid Glass & MoreSwiftUI Grids - LazyVGrid, LazyHGrid, Static GridSwift Protocols - An IntroductionMaximize Your YouTube Business - Creator View 2.0iOS 19 Redesign, State of Subscription Apps, Swift Concurrency, Screen Design InspirationConcentricity is a Huge deal when building for iOS 26Xcode Tip - Multi-line Cursor Editing #iosdeveloper #swift #xcodeSwift Algorithms - Faster, Cleaner Code. (Chunked Example)Coding Bootcamps are NOT worth it! Unless…How to Create 3D App Icons for visionOS | XcodeFrom Homeless to $130k+ iOS Dev | Self-Taught
Sean Allen |

Interactive SwiftUI Chart - Drag to Show Data w/ Animation

SHARE TO X SHARE TO REDDIT SHARE TO FACEBOOK WALLPAPER