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?
Nevermind I found it.
I used
[self.chartView highlightValueWithXIndex:3 dataSetIndex:1 callDelegate:self];
Thanks!
@osolano thanks it's really helpful but can you please elaborate how I highlight two value at a time?
@SagarDabhi Did you ever work out how to highlight multiple values?
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)
@shashidhar34 You can put in Double.nan for the Y value and it'll work. I had the same issue.
Most helpful comment
Nevermind I found it.
I used
[self.chartView highlightValueWithXIndex:3 dataSetIndex:1 callDelegate:self];
Thanks!