#swiftcharts

Sören Gadesense
2025-05-25
Chris Wu :cwy:MuseumShuffle
2025-05-25

I just wrote an addendum to the blog post I wrote recently about struggling to find an answer to a Swift Charts problem I was having.

It was a night and day difference with the next issue I encountered.

I don’t want to give the impression that I’m against using AI for coding help. I just saved a ton of time with a problem I was having with a chart that contained two different LineMarks. VoiceOver was only reading the data from one of them. Thanks to Perplexity I learned to use .contain with .accessibilityElement(children:). Previous I had only used .combine with it.

Code follows:

Chart {
    // your ForEach code
}
.accessibilityElement(children: .contain)
.accessibilityLabel("Monthly Temperature Comparison Chart")
Chris Wu :cwy:MuseumShuffle
2025-05-16

Swift Charts lets you manually choose what color is used for each category in the legend but it doesn't appear that you can manually choose what shapes appear in it.

I made my own legend to use when differentiate without color is active.

I think that I'm done with this new feature!

Precipitation chart for Please Don't Rain with weather symbols above each bar in the bar chart. The chart legend shows what each symbol means.
Chris Wu :cwy:MuseumShuffle
2025-05-15

I created an example in my accessibility settings for @PleaseDontRain to show how I'm differentiating without color for my bar charts.

Really happy with how this turned out!

Chris Wu :cwy:MuseumShuffle
2025-05-15

I've done some more experimenting and now I'm leaning towards tiny basic shapes above each bar instead of using letters to differentiate without color.

The legend hasn't been addressed yet.

A Please Don't Rain bar chart with either circles or triangles above each bar to indicate rain or snow.
Chris Wu :cwy:MuseumShuffle
2025-05-13

Spent some time experimenting with @bas and we couldn't get visual patterns to appear in bars via Swift Charts to differentiate without color.

I filed feedback FB17599628 as a suggestion.

Christopher Wu
May 13, 2025 at 6:19 PM
Bar charts in Swift Charts could use a way to differentiate without colors
FB17599628
Recent Similar Reports: None
Resolution: Open
Chris Wu :cwy:MuseumShuffle
2025-05-13

With the announcement of App Store Accessibility Nutrition Labels I just realized that my precipitation charts would fail the “Differentiate Without Color Alone” label.

With a LineMark Swift Charts lets you change the plot shape used with each line. But what should you do for a BarChart?

I don’t have room to add an SF Symbol as an annotation on top of each bar, but a letter would seem to work.

Precipitation bar chart for Please Don't Rain.  A "R" standing for "Rain" has been added to the top of each rain bar.
Chris Wu :cwy:MuseumShuffle
2025-05-12

I wrote a blog post about a Swift Charts issue that's been bothering me for the longest time and how I finally found a solution for it.

Hoping this saves someone some time!

chriswu.com/posts/swiftui/char

2025-04-13

I’m adding charts to my spoon management app. Still work in progress.

#spoon #pacing

(No third party lib, no #SwiftCharts, no #SwiftUI)

Chart view in an iOS app showing bar charts representing planned and completed spoons.
2024-08-02

Having duplicate data results in some wacky things happening with AreaMark. Stripping out the dupes fixes it, but no idea what would explain this

To be fair, the duplicate data is a result of a bug that I was unaware of, so that’s cool to get fixed, but still weird

#swiftcharts

Rodrigo Araújormaraujo
2024-07-19

Been working on @charty 2.0 for the last couple of weeks!

- 90% of the apps actions have been rewritten as AppIntents, which I think is a good start for the controversial Apple Intelligence features
- Numeric and circular charts mostly work, save for some axes’ scaling issues
- I’ve managed to add secondary axis support to
- I’m now rewriting Ring Charts in . Things are going well! 🚀

Framed with @Shareshot 😍

Charty 2.0 screenshot showing 2 ring charts
Chris Wu :cwy:MuseumShuffle
2024-07-09

I've got a theory that WeatherKit was enhanced for iOS 17 users with the recent additions for iOS 18 that we're now testing.

I'm adding some new features to the iOS 17 version of Please Don't Rain and just realized that I'm seeing sleet on my precipitation chart. I have NEVER seen that before. It's only been rain and snow returned (and I have looked at a LOT of forecasts).

I felt like a proud papa watching his kid handle a new situation appropriately. 🥹

Please Don't Rain precipitation chart showing snow, sleet, and rain.
2024-06-23

using basic #swiftcharts for instance activity stats in #Fedicat

Axel Le Pennecalpennec@iosdev.space
2024-06-17

Now, this is the first version of the app, I have tons of ideas to improve it but I wanted to get it in people's hands and see what people like, what they want, and how it's used 🙂

On the technical side, the app is entirely built in #SwiftUI (what did you expect?), and leverages #CoreLocation, #MapKit, #WeatherKit and a little bit of #SwiftCharts.

This app is the reason I filed and share many feedback related to these frameworks lately 😄

#iOS #AppStore #IndieDev

Patrickpaaast
2024-06-05

machen interaktive Charts wirklich einfach ☺️

Chris Wu :cwy:MuseumShuffle
2024-01-25

VoiceOver question:

Should I be able to use .accessibilityLabel and .accessibilityValue with a RuleMark in Swift Charts?

I'm having to create an invisible PointMark to get around the fact that I can't seem to.

RuleMark(x: , calendar: ))
    .foregroundStyle(Color.primary) 
// i can't get it to read the label and value here so i hid it
    .accessibilityHidden(true)

PointMark(x: , y: )
.foregroundStyle(Color.clear) // invisible bc i can't get VO to read labels for a rulemark
.accessibilityLabel(Text("Current Hour"))
.accessibilityValue("\(markThisHour.formatted(dateTimeToUse.hour(.defaultDigits(amPM: .wide))))")
Chris Wu :cwy:MuseumShuffle
2024-01-24

I liked the segmented Picker that I added to my precipitation chart so much that I used one to create a new "feels like" variation of the temperature chart.

Chris Wu :cwy:MuseumShuffle
2024-01-22

But looks what happens with 24 entries and VoiceOver grouping entries together. VoiceOver is just saying "symbol" as if the SF Symbol was not there at all.

🧵 3/3

Chris Wu :cwy:MuseumShuffle
2024-01-22

Here's an example with a small amount of data. You'll notice that VoiceOver is saying "symbol heavy rain", which is what is expected.

🧵 2/3

Client Info

Server: https://mastodon.social
Version: 2025.04
Repository: https://github.com/cyevgeniy/lmst