You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Jonas Gehring edited this page Apr 12, 2019
·
2 revisions
Tap Listener on Data Points
It is possible to add a tap listener, that will be called if the user taps on a single data point. You have to add the listener to the series object. So if you have multiple series, you can use specific tap handler for any series.
Here is an example:
series.setOnDataPointTapListener(newOnDataPointTapListener() {
@OverridepublicvoidonTap(Seriesseries, DataPointInterfacedataPoint) {
Toast.makeText(getActivity(), "Series1: On Data Point clicked: "+dataPoint, Toast.LENGTH_SHORT).show();
}
});
Notice:
If there is overlapping data because of multiple series, multiple listeners can be called due a single tap.