Charts: Empty LineChart reports "[Unknown process name] CGAffineTransformInvert: singular matrix." in SwiftUI view!

Created on 19 Feb 2021  Â·  2Comments  Â·  Source: danielgindi/Charts

ℹ Please fill out this template when filing an issue.

Most helpful comment

Charts version: 3.6.0
Xcode version: Version 12.4 (12D4e)
Swift version: 5
Platform(s) running Charts: iOS v14.4
macOS version running Xcode: macOS Big Sur 11.2.1 (20D74)

Problem/Bug:
A a LineChart constructed as UIViewRepresentable in SwiftUI will get " [Unknown process name] CGAffineTransformInvert: singular matrix." when displaying an empty chart (no data).

The message is generated when internal drawing calls lowestVisibleX and highestVisibleX function getTransformer(forAxis: .left).pixelToValues(&pt). to be more specific: pixelToValues wants to apply an inverted pixel to value matrix calling valueToPixelMatrix.inverted() which in this case produces an invalid empty CGAffineTransform...

I've included a small project to show the problem.
ChartTest.zip

All 2 comments

Charts version: 3.6.0
Xcode version: Version 12.4 (12D4e)
Swift version: 5
Platform(s) running Charts: iOS v14.4
macOS version running Xcode: macOS Big Sur 11.2.1 (20D74)

Problem/Bug:
A a LineChart constructed as UIViewRepresentable in SwiftUI will get " [Unknown process name] CGAffineTransformInvert: singular matrix." when displaying an empty chart (no data).

The message is generated when internal drawing calls lowestVisibleX and highestVisibleX function getTransformer(forAxis: .left).pixelToValues(&pt). to be more specific: pixelToValues wants to apply an inverted pixel to value matrix calling valueToPixelMatrix.inverted() which in this case produces an invalid empty CGAffineTransform...

I've included a small project to show the problem.
ChartTest.zip

This is still an issue in SwiftUI

Was this page helpful?
0 / 5 - 0 ratings

Related issues

sjdevlin picture sjdevlin  Â·  3Comments

Bharati555 picture Bharati555  Â·  4Comments

Aungbandlab picture Aungbandlab  Â·  4Comments

kwstasna picture kwstasna  Â·  3Comments

guanyanlin picture guanyanlin  Â·  3Comments