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

Programatically highlight a data point in line chart #668

Closed
osolano opened this issue Jan 12, 2016 · 5 comments
Closed

Programatically highlight a data point in line chart #668

osolano opened this issue Jan 12, 2016 · 5 comments

Comments

@osolano
Copy link

osolano commented Jan 12, 2016

Hi,

I've been looking and haven't been able to find a way to programmatically select a data point in a linechart. Is there a method to do this? If there is how do i access it?

@osolano
Copy link
Author

osolano commented Jan 12, 2016

Nevermind I found it.

I used
[self.chartView highlightValueWithXIndex:3 dataSetIndex:1 callDelegate:self];
Thanks!

@osolano osolano closed this as completed Jan 12, 2016
@SagarDabhi
Copy link

@osolano thanks it's really helpful but can you please elaborate how I highlight two value at a time?

@muzoman
Copy link

muzoman commented Jul 11, 2018

@SagarDabhi Did you ever work out how to highlight multiple values?

@shashidhar34
Copy link

Calling highlightValue without passing y value didn't work for me. I had to pass y value as well using the call
chartView.highlightValue(x: x, y: y, dataSetIndex: 0, callDelegate: true)

@AdrianBinDC
Copy link

@shashidhar34 You can put in Double.nan for the Y value and it'll work. I had the same issue.

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

5 participants