willdale / SwiftUICharts

A charts / plotting library for SwiftUI. Works on macOS, iOS, watchOS, and tvOS and has accessibility features built in.
MIT License
837 stars 103 forks source link

Invalid frame dimension (negative or non-finite) #217

Open AvdLee opened 2 years ago

AvdLee commented 2 years ago

See:

CleanShot 2022-08-11 at 16 13 36@2x

Xcode 14 shows these as purple warnings, whereas Xcode 13 only shows them as system logs.

The affected method:

CleanShot 2022-08-11 at 16 14 10@2x

(lldb) po totalHeight
96.0

(lldb) po value
-97134000.0

(lldb) po maxValue
149426000.0

(lldb) po divideByZeroProtection(CGFloat.self, value, maxValue)
-0.6500475151580046

(lldb) po totalHeight * divideByZeroProtection(CGFloat.self, value, maxValue)
-62.40456145516845

It starts with this method:

CleanShot 2022-08-11 at 16 15 51@2x