@@ -261,90 +261,6 @@ protected void drawAdditional() {
261261 }
262262 }
263263
264- // /**
265- // * Returns the x index of the touch. If touch is out of the chart, the first or last index will be returned
266- // *
267- // * @param x
268- // * @param y
269- // * @return
270- // */
271- // public int getXIndexByTouchPoint(float x, float y) {
272- // // create an array of the touch-point
273- // float[] pts = new float[2];
274- // pts[0] = x;
275- // pts[1] = y;
276- //
277- // Matrix tmp = new Matrix();
278- //
279- // // invert all matrixes to convert back to the original value
280- // mMatrixOffset.invert(tmp);
281- // tmp.mapPoints(pts);
282- //
283- // mMatrixTouch.invert(tmp);
284- // tmp.mapPoints(pts);
285- //
286- // mMatrixValueToPx.invert(tmp);
287- // tmp.mapPoints(pts);
288- //
289- // double xTouchVal = pts[0];
290- // double yTouchVal = pts[1];
291- // double base = Math.floor(xTouchVal);
292- //
293- // Log.i(LOG_TAG, "touchindex x: " + xTouchVal + ", touchindex y: " + yTouchVal);
294- //
295- // // touch out of chart
296- // if (xTouchVal < 0)
297- // return 0;
298- // if (xTouchVal > mDeltaX) {
299- // return mData.getXValCount() - 1;
300- // }
301- //
302- // return (int) base;
303- // }
304- //
305- // public double getYValueByTouchPoint(float x, float y) {
306- // // create an array of the touch-point
307- // float[] pts = new float[2];
308- // pts[0] = x;
309- // pts[1] = y;
310- //
311- // Matrix tmp = new Matrix();
312- //
313- // // invert all matrixes to convert back to the original value
314- // mMatrixOffset.invert(tmp);
315- // tmp.mapPoints(pts);
316- //
317- // mMatrixTouch.invert(tmp);
318- // tmp.mapPoints(pts);
319- //
320- // mMatrixValueToPx.invert(tmp);
321- // tmp.mapPoints(pts);
322- //
323- // double xTouchVal = pts[0];
324- // double yTouchVal = pts[1];
325- //
326- // return yTouchVal;
327- // }
328-
329- /**
330- * Sets a filter on the whole ChartData. If the type is NONE, the filtering is reset. Be aware that the original
331- * DataSets are not modified. Instead there are modified copies of the data. All methods return the filtered values
332- * if a filter is set. To receive the original values despite a set filter, call getOriginalDataSets() of the class
333- * ChartData. The ChartData can be received by calling getData().
334- *
335- * @param type
336- * the filter type. NONE to reset filtering
337- * @param tolerance
338- * the tolerance
339- */
340- public void setFilter (ApproximatorType type , double tolerance ) {
341- mData .setFilter (type , tolerance );
342- }
343-
344- public boolean isFilterSet () {
345- return mData .isApproximatedData ();
346- }
347-
348264 /**
349265 * set this to true to enable the drawing of circle indicators
350266 *
0 commit comments