getEntryForXValue abstract method

T? getEntryForXValue(
  1. double xValue, [
  2. double closestToY = double.nan,
  3. Rounding rounding = Rounding.CLOSEST
])

Returns the entry at xValue, or the entry at the nearest x value according to rounding if there is none.

closestToY: when several entries share the x value, the one whose y value is nearest to this wins; NaN picks the first. rounding: whether to round up, down or to the closest x value when xValue has no entry. Returns null if the data set is empty or rounding leaves the entry range.

Implementation

T? getEntryForXValue(
  double xValue, [
  double closestToY = double.nan,
  Rounding rounding = Rounding.CLOSEST,
]);