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

Problem selecting bubbles on the same xIndex #2060

Closed
chuynadamas opened this issue Jan 10, 2017 · 1 comment
Closed

Problem selecting bubbles on the same xIndex #2060

chuynadamas opened this issue Jan 10, 2017 · 1 comment

Comments

@chuynadamas
Copy link
Contributor

Hi @danielgindi and @liuxuan30 again, thank you for this amazing job!

I found a little issue here, when you have a chart with some bubbles at the same xIndex, something like that, you are not able to select all of them.

screen shot 2017-01-10 at 12 35 33 pm

I did a little research and i discover that the following comparison on ChartDataSet.swift the problem

                    if abs(value.y - yValue) < abs(closestYValue - yValue)
                    {
                        closestYValue = yValue
                        closestYIndex = closest
                    }

If we add an equal = now we are able to select every bubble.

                    if abs(value.y - yValue) <= abs(closestYValue - yValue)
                    {
                        closestYValue = yValue
                        closestYIndex = closest
                    }

ezgif com-video-to-gif

@liuxuan30
Copy link
Member

sounds like you solved it? PR welcome :)

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

2 participants