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

Getting the value of an item selected. #4295

Closed
mginz83 opened this issue Feb 21, 2020 · 1 comment
Closed

Getting the value of an item selected. #4295

mginz83 opened this issue Feb 21, 2020 · 1 comment

Comments

@mginz83
Copy link

mginz83 commented Feb 21, 2020

I see the following code...

    override func chartValueSelected(_ chartView: ChartViewBase, entry: ChartDataEntry, highlight: Highlight) {
        super.chartValueSelected(chartView, entry: entry, highlight: highlight)
        
    }

But this doesnt work, my controller extends a UIViewController and not a DemoBaseViewController, but I also do not see any other code snippet for getting the items value on tap.

@mginz83
Copy link
Author

mginz83 commented Feb 21, 2020

Solution: add the ChartViewDelegate to the class.

Added the following code:

    func chartValueSelected(_ chartView: ChartViewBase, entry: ChartDataEntry, highlight: Highlight) {
        print("\(entry.y)")
    }

@mginz83 mginz83 closed this as completed Feb 21, 2020
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