getDataSetByTouchPoint method

IBarLineScatterCandleBubbleDataSet<Entry>? getDataSetByTouchPoint(
  1. double x,
  2. double y
)

Data set of the entry nearest to a pixel position, or null when there is no data or no entry within maxHighlightDistance.

Implementation

IBarLineScatterCandleBubbleDataSet? getDataSetByTouchPoint(
  double x,
  double y,
) {
  final h = getHighlightByTouchPoint(x, y);
  if (h == null) return null;
  return data?.getDataSetByIndex(h.dataSetIndex);
}