getPosition method

MPPointF getPosition(
  1. Entry e,
  2. AxisDependency axis
)

Returns a recyclable MPPointF instance. Returns the position (in pixels) the provided Entry has inside the chart view or null, if the provided Entry is null.

@param e @return

Implementation

MPPointF getPosition(Entry e, AxisDependency axis) {
  // if (e == null) return null;

  mGetPositionBuffer[0] = e.x;
  mGetPositionBuffer[1] = e.y;

  getTransformer(axis)!.pointValuesToPixel(mGetPositionBuffer);

  return MPPointF.getInstance1(mGetPositionBuffer[0], mGetPositionBuffer[1]);
}