Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

didTouchChart will not return last index #123

Open
tyagishi opened this issue Apr 21, 2020 · 0 comments
Open

didTouchChart will not return last index #123

tyagishi opened this issue Apr 21, 2020 · 0 comments

Comments

@tyagishi
Copy link

issue
callback function didTouchChart will not return last index even last data point is touched.

how to reproduce:
in StockChart/ SwiftChart Examples, touched data will pop up.
try to touch last point. only "106.98" will pop up but last data is "108.00"

Last data is 108.00. (in data file "APPL.json" has followings.)
...
{ "date": "2014-10-30", "close": 106.98 },
{ "date": "2014-10-31", "close": 108.00 }]
} // end of data

comment:
after small investigation, I found method "handleTouchEvents" always select left side index.
i.e. "findClosestInValues" will return left-side index and right-side index for the value, but "handleTouchEvents" will always choose left-side index. (so last index will never be returned.)
is this expected behavior?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant