Swift Charts are being rendered very higgledy piggledy

I have raised a Feedback FB23015978

This applied to Xcode/Ios 27/26 and maybe earlier.

This issue relates to ‘Charts’

This issue exists back to iOS 26 and maybe before.

I have provided an app that creates a simple table of integer values representing a summary of scores achieved in 10m Air Pistol shooting. It is genuine data that I want to display certain aspects of. The the counts represent the number of times that particular score was achieved during a 60 shot qualification match.

The graph I want to show is the spread of the number of 10s, 9s and hopefully not to many 8s or less.

To say that this was a nightmare is a massive understatement. To narrow down the issue I have created an app whose sole purpose is to represent that real world data.

Fundamentally, the score and count are integer values. I have created a set of view that display a bar chart of the data representing the values as

Score Count

———————

Int Int

String Int

Int String

String String

Furthermore, I have added a version of each of the above using a domain such that any values with a count of zero up to the first non-zero value are excluded from the charts.

Each screenshot of the chart also show the text for the actual Chart view.

As can be seen by visual inspection, it is pretty much a total mess.

Firstly, you can see that some of the charts have thick bars that are as expected however, half of the charts are rendered with little thin bars.

The IntStringDomain, StringInt, and StringString charts have bars that are drawn outside of the designated chart area.

Charts such as the IntInt and IntIntDomain chart do not show the righthand x-axis value.

Although some of the chart data may not make sense the way it is presented which attribute is the x-axis or y-axis, the charts should be bullet proof.

I have attached the screen shots. can't find a way to post he app sorry.

Here are the charts, each one also shows the code that generated it. For those of a nervous disposition, look away now.

If you want to see what happens on your system then the source is available at

[https://github.com/csantavy/BarChartErrors]\

If you get the same or other errors then please raise a Feedback referencing FB23015978

Also, I have seen the following two sets of errors in the debug area.

Attribute Graph Based Charts Error: The scale domain configuration type number doesn't match encoded value type for channel x

Charts: Custom UnitPoint values are not supported in AxisValueLabel's anchor property. Please use leading, topLeading, center, etc.

Charts: Falling back to a fixed dimension size for a mark. Consider adding unit to the data or specifying an exact dimension size.

Attribute Graph Based Charts Error: The scale domain configuration type number doesn't match encoded value type for channel x

IOSurfaceClientSetSurfaceNotify failed e00002c7

fopen failed for data file: errno = 2 (No such file or directory)

fopen failed for data file: errno = 2 (No such file or directory)

non-launching port is incompatible with service identifier "com.apple.PointerUI.pointeruid.default-service"

objc[13256]: Class _UIKeyboardIntelligenceElement is implemented in both /private/var/run/com.apple.security.cryptexd/mnt/com.apple.iPhoneOS.SimulatorRuntime-v24.1.5355.16.5q1iGi/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS 27.0.simruntime/Contents/Resources/RuntimeRoot/System/Library/PrivateFrameworks/UIKitCore.framework/UIKitCore (0x1f086c3c8) and /private/var/run/com.apple.security.cryptexd/mnt/com.apple.iPhoneOS.SimulatorRuntime-v24.1.5355.16.5q1iGi/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS 27.0.simruntime/Contents/Resources/RuntimeRoot/System/Library/PrivateFrameworks/AutoFillUI.framework/AutoFillUI (0x10ed48550). This may cause spurious casting failures and mysterious crashes. One of the duplicates must be removed or renamed.

and

Attribute Graph Based Charts Error: The scale domain configuration type number doesn't match encoded value type for channel x

Charts: Custom UnitPoint values are not supported in AxisValueLabel's anchor property. Please use leading, topLeading, center, etc.

Charts: Falling back to a fixed dimension size for a mark. Consider adding unit to the data or specifying an exact dimension size.

IOSurfaceClientSetSurfaceNotify failed e00002c7

non-launching port is incompatible with service identifier "com.apple.PointerUI.pointeruid.default-service"

Thank you for filing feedback!

Swift Charts underwent a massive re-architecture this year to drastically improve performance in many cases. Unfortunately, as with any large code change, it's possible some bugs were introduced in the process. Such are the realities of software development!

Please continue to file feedback reports for any other bugs you running into in the new SDKs (especially in Charts given these large changes) and hopefully we'll be able to get them patched up for you!

Swift Charts are being rendered very higgledy piggledy
 
 
Q