@@ -511,25 +511,6 @@ public void calculateOffsets() {
511511 prepareValuePxMatrix ();
512512 }
513513
514- // @Override
515- // protected float[] getMarkerPosition(Highlight high) {
516- // return new float[] { high.getXPx(), high.getYPx() };
517- //
518- // int dataSetIndex = highlight.getDataSetIndex();
519- // float xPos = e.getX();
520- // float yPos = e.getY() * mAnimator.getPhaseY();
521- //
522- // // position of the marker depends on selected value index and value
523- // float[] pts = new float[]{
524- // xPos, yPos
525- // };
526- //
527- // getTransformer(mData.getDataSetByIndex(dataSetIndex).getAxisDependency())
528- // .pointValuesToPixel(pts);
529- //
530- // return pts;
531- // }
532-
533514 /**
534515 * draws the grid background
535516 */
@@ -1044,13 +1025,12 @@ public MPPointF getPosition(Entry e, AxisDependency axis) {
10441025 if (e == null )
10451026 return null ;
10461027
1047- float [] vals = mGetPositionBuffer ;
1048- vals [0 ] = e .getX ();
1049- vals [1 ] = e .getY ();
1028+ mGetPositionBuffer [0 ] = e .getX ();
1029+ mGetPositionBuffer [1 ] = e .getY ();
10501030
1051- getTransformer (axis ).pointValuesToPixel (vals );
1031+ getTransformer (axis ).pointValuesToPixel (mGetPositionBuffer );
10521032
1053- return MPPointF .getInstance (vals [0 ], vals [1 ]);
1033+ return MPPointF .getInstance (mGetPositionBuffer [0 ], mGetPositionBuffer [1 ]);
10541034 }
10551035
10561036 /**
@@ -1255,22 +1235,6 @@ public MPPointD getPixelsForValues(float x, float y, AxisDependency axis) {
12551235 return getTransformer (axis ).getPixelsForValues (x , y );
12561236 }
12571237
1258- MPPointD pointForGetYValueByTouchPoint = MPPointD .getInstance (0 , 0 );
1259-
1260- /**
1261- * Returns y value at the given touch position (must not necessarily be
1262- * a value contained in one of the datasets)
1263- *
1264- * @param x
1265- * @param y
1266- * @return
1267- */
1268- public float getYValueByTouchPoint (float x , float y , AxisDependency axis ) {
1269- getValuesByTouchPoint (x , y , axis , pointForGetYValueByTouchPoint );
1270- float result = (float ) pointForGetYValueByTouchPoint .y ;
1271- return result ;
1272- }
1273-
12741238 /**
12751239 * returns the Entry object displayed at the touched position of the chart
12761240 *
0 commit comments