ChartsOrg / Charts

Beautiful charts for iOS/tvOS/OSX! The Apple side of the crossplatform MPAndroidChart.
Apache License 2.0
27.51k stars 5.99k forks source link

LineChart point selection issue #5061

Open ncubelic opened 1 year ago

ncubelic commented 1 year ago

LineChart.zip

What did you do?

I'm having issues with LineChart when using numbers on y axis which differs on second or third decimal place. I can't select point on a graph. No matter which point on graph is selected, only first or last point is selected.

What did you expect to happen?

Point which is selected should be highlighted and selected.

What happened instead?

First or last point is selected.

Charts Environment

Charts version/Branch/Commit Number: 4.1.0

Xcode version: Xcode 14.3

Swift version: Swift 5

Platform(s) running Charts: iOS

macOS version running Xcode:

Demo Project

LineChart.zip

stas44812 commented 1 year ago

did you resolve this? facing same problem

ncubelic commented 1 year ago

@stas44812 Yes I resolved the issue. Problem was due to unsorted data set. I don’t know logic behind, but when you pass sorted data set (in my case by date), everything works perfectly.

stas44812 commented 1 year ago

thanks man! you saved my time