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

The small double number is not drawn. #206

Closed vilimas closed 2 years ago

vilimas commented 2 years ago

I found an issue where then all values are smaller than 0.00001 it will be a flat line, and the graph will not zoom in. Try to set a custom baseline and top line, but nothing changes.

Is this bug, or am I missing some settings?

IMG_5986

vilimas commented 2 years ago

I found a problem line. So if the value is less than 0.001 it will not change the range value and will not center the graph. Just don't understand why it's needed.

https://github.com/willdale/SwiftUICharts/blob/9177c49ffc574a212e1604d2a268ddfda423a449/Sources/SwiftUICharts/SharedLineAndBar/Models/Protocols/LineAndBarProtocolsExtentions.swift#L34