swift-linechart icon indicating copy to clipboard operation
swift-linechart copied to clipboard

Removed all forced unwrap & support for empty data sets

Open ekscrypto opened this issue 6 years ago • 1 comments

Should fix several bug reports about unwrapping nil values

ekscrypto avatar Feb 10 '19 13:02 ekscrypto

In commit 8311a64 I added support for empty data sets and 1-item data sets; several assumptions about minimum data set sizes like data.count - 1 were sprinkled here and there causing CGFloat.nan and to be generated in the linear scales then later creating crashes during rendering. While I attempted to maintain the current behaviour as much as possible, proper testing should be done to ensure the library is working for all supported scenarios.

ekscrypto avatar Feb 11 '19 04:02 ekscrypto