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

chartValueSelected Delegate Method Not Called #2404

Closed
socaljoker opened this issue May 1, 2017 · 3 comments
Closed

chartValueSelected Delegate Method Not Called #2404

socaljoker opened this issue May 1, 2017 · 3 comments

Comments

@socaljoker
Copy link

When tapping on a bar using the BarChartView, the chartValueNothingSelected delegate method gets called instead of the chartValueSelected delegate method because the highlight is null in the highlightValue method. I've tried everything to get it to not be null but cannot figure it out.

@socaljoker socaljoker changed the title getHighlight returns null chartValueSelected Delegate Method Not Called May 1, 2017
@liuxuan30
Copy link
Member

liuxuan30 commented May 3, 2017

check

        if callDelegate && delegate != nil
        {
            if h == nil
            {
                delegate!.chartValueNothingSelected?(self)
            }
            else
            {
                // notify the listener
                delegate!.chartValueSelected?(self, entry: entry!, highlight: h!)
            }
        }

You can override it to get what you want.

@socaljoker
Copy link
Author

I did check that. h is always null no matter what. I've set a highlighter on the chart.

@liuxuan30
Copy link
Member

well.. you could add breakpoints and trace back to see how it generates highlight object. Please refer ChartsDemo as well.

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