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

Clearing all highlighted values #171

Closed
mcooksey opened this issue Jun 23, 2015 · 7 comments
Closed

Clearing all highlighted values #171

mcooksey opened this issue Jun 23, 2015 · 7 comments

Comments

@mcooksey
Copy link

I am highlighting a value on my chart with a BalloonMarker when it is tapped, like what is done in the ChartsDemo application.

Now, I need to remove a selection programmatically. I looked in the Android documentation and saw in "Interacting with the Chart" it says:

highlightValues(Highlight[] highs): Highlights the values at the given indices in the given DataSets. Provide null or an empty array to undo all highlighting.

However, this doesn't seem to be exposed to my object anywhere. Is this implemented? Any ideas how to accomplish this?

@danielgindi
Copy link
Collaborator

It actually is exposed, as highlightValues exactly, on every chart view.

@mcooksey
Copy link
Author

@danielgindi I honestly have no idea how I missed that..

It's possible I was looking for that property on the data set, not the chart itself.

Either way, sorry about that! Thanks for the help!

@danielgindi
Copy link
Collaborator

No problem! Have fun!

On Mon, Jun 29, 2015 at 11:28 PM, Matt Cooksey notifications@github.com
wrote:

@danielgindi https://github.com/danielgindi I honestly have no idea how
I missed that..

It's possible I was looking for that property on the data set, not the
chart itself.

Either way, sorry about that! Thanks for the help!


Reply to this email directly or view it on GitHub
#171 (comment)
.

@carlosandresSanchez
Copy link

Is exposed highlightValues in Combined Chart View? It does not appear to me

@mcooksey
Copy link
Author

@carlosandresSanchez yes it is. In my case, I'm using a CombinedChartView and have an instance of that class named chartView.

In order to clear all highlighted values, I had to do:

[self.chartView highlightValues:NULL];

Hope this helps!

@Visangle
Copy link

@mcooksey good! This helps me a lot!!

@kscheff
Copy link

kscheff commented Jul 23, 2017

in Version 3.0.2 I use a combinedChartView for different data sets. When switching over to a new data set I call
combinedChartView.initialize()
However this misses out to clear previous highlights. I would expect that .initialize() provides me a clean chart with no left overs.

update: I overlooked the function combinedChartView.clear() which might do the entire job. So I wonder why .initialize() is there. I have not verified the functionality of .clear().

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