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

Contains is not implemented in ChartDataSet, crashes when called #4212

Closed
dannyiss opened this issue Nov 12, 2019 · 1 comment
Closed

Contains is not implemented in ChartDataSet, crashes when called #4212

dannyiss opened this issue Nov 12, 2019 · 1 comment

Comments

@dannyiss
Copy link

We are getting crashes when we call "contains(_ e: ChartDataEntry) -> Bool" on a LineChartDataSet in 3.4.0. This problem does not happen in 3.2.1 of the library. This is happening because contains is not implemented anywhere up the chain of parent classes of LineChartDataSet, including in ChartDataSet where it used to be implemented in 3.2.1.

We were able to fix the issue locally by reimplementing contains in ChartDataSet like so, but it seems like this should be reverted back to the way it was before.

    override open func contains(_ e: ChartDataEntry) -> Bool {
        return entries.contains(e)
    }

Is there any reason why this function is no longer implemented anywhere anymore?

Thanks.

@liuxuan30
Copy link
Member

liuxuan30 commented Jan 20, 2020

it's removed in #3815. ChartDataSet has adopted some collection types, you should be able to still use however... this is the hint on my side in ChartsDemo:
image

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