NodeJSNoob
NodeJSNoob

Reputation: 127

MPAndroidChart Scrubbing?

I know there are interaction listeners such as onChartGestureStart, onChartSingleTapped, etc.

What I would like to have is kind of what spark has which is scrubbing for a line chart. So when you drag your finger over the points of the chart, I can get the Y values and update a TextView.

Currently, if you use either onChartGestureStart or onChartSingleTapped, the values updates only once where you originally tap and if you tap again, it'll update.

Is there a hack around to this?

Upvotes: 0

Views: 304

Answers (1)

jolima
jolima

Reputation: 56

You can use setHighlightEnabled(true) to enable the scrubbing, and listen to value selected via OnChartValueSelectedListener.

See wiki here.

Upvotes: 1

Related Questions