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

Remove Highlight from bar graph #2337

Closed
AH24 opened this issue Apr 7, 2017 · 3 comments
Closed

Remove Highlight from bar graph #2337

AH24 opened this issue Apr 7, 2017 · 3 comments

Comments

@AH24
Copy link

AH24 commented Apr 7, 2017

I currently have a storyboard where the first page contains a bar graph, when the user selects a bar I push to the next page. When I go back from that page the selected bar is still highlighted and I have to click it again to remove that highlight.

I was trying to remove the highlight in the function:
-(void)chartValueSelected:(ChartViewBase *)chartView entry:(ChartDataEntry *)entry highlight:(ChartHighlight *)highlight;
but I am not having any luck.

I am using Objective C. How do I go about doing this? I don't want to disable the highlighting all together just remove that highlight from the selected bar.

@liuxuan30
Copy link
Member

liuxuan30 commented Apr 10, 2017

chartValueSelected is delegate method, calling it by yourself is not supposed to work.
You can remove the highlight by passing nil or empty highlight objects in

open func highlightValue(_ highlight: Highlight?, callDelegate: Bool)

Just take a look at the implementation.

@AH24
Copy link
Author

AH24 commented Apr 11, 2017

How do I call that using objective c?

@liuxuan30
Copy link
Member

well, check out apple's documentation.

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