I'm running macOS 26.3 and using Xcode 26.4.
I'm trying to create a SwiftUI Chart that can scroll horizontally.
In the SwiftUI Preview, and also running the app on macOS, the chart displays a scrollbar, but the scrollbar does not respond to mouse interaction (dragging the scrollbar, or clicking in the gutters on either side of the scrollbar).
Here's the sample code:
import SwiftUI
import Charts
private struct DataPoint: Identifiable {
let id: Int
let x: Double
let value: Double
}
struct ContentView: View {
private let points: [DataPoint] = (0..<60).map { index in
let wave = sin(Double(index) * 0.28) * 18
let trend = Double(index) * 0.35
return DataPoint(id: index, x: Double(index), value: 60 + wave + trend)
}
var body: some View {
Chart(points) { point in
BarMark(
x: .value("Data Point", point.x),
y: .value("Value", point.value)
)
.foregroundStyle(.blue.gradient)
}
.chartScrollableAxes(.horizontal)
// Doesn't work:
// .scrollIndicators(.hidden) // .never also does not work
.chartXVisibleDomain(length: 20)
.padding()
}
}
#Preview {
ContentView()
}
Our engineering teams need to investigate this issue, as resolution may involve changes to Apple's software. Please file a bug report, include a small Xcode project and some directions that can be used to reproduce the problem, and post the Feedback number here once you do. I'll check the status next time I do a sweep of forums posts where I've suggested bug reports and post any information about changes I am able to share to this thread.
Bug Reporting: How and Why? has tips on creating your bug report.