@Override public float getHighestVisibleX() { getTransformer(AxisDependency.LEFT).getValuesByTouchPoint(mViewPortHandler.contentLeft(), mViewPortHandler.contentTop(), posForGetHighestVisibleX); float result = (float) Math.min(mXAxis.mAxisMaximum, posForGetHighestVisibleX.y); return result; }
@Override public float getLowestVisibleX() { getTransformer(AxisDependency.LEFT).getValuesByTouchPoint(mViewPortHandler.contentLeft(), mViewPortHandler.contentBottom(), posForGetLowestVisibleX); float result = (float) Math.max(mXAxis.mAxisMinimum, posForGetLowestVisibleX.y); return result; }
@Override public void getBarBounds(BarEntry e, RectF outputRect) { RectF bounds = outputRect; IBarDataSet set = mData.getDataSetForEntry(e); if (set == null) { outputRect.set(Float.MIN_VALUE, Float.MIN_VALUE, Float.MIN_VALUE, Float.MIN_VALUE); return; } float y = e.getY(); float x = e.getX(); float barWidth = mData.getBarWidth(); float top = x - barWidth / 2f; float bottom = x + barWidth / 2f; float left = y >= 0 ? y : 0; float right = y <= 0 ? y : 0; bounds.set(left, top, right, bottom); getTransformer(set.getAxisDependency()).rectValueToPixel(bounds); }
/** * Returns a recyclable MPPointF instance. * * @param e * @param axis * @return */ @Override public MPPointF getPosition(Entry e, AxisDependency axis) { if (e == null) return null; float[] vals = mGetPositionBuffer; vals[0] = e.getY(); vals[1] = e.getX(); getTransformer(axis).pointValuesToPixel(vals); return MPPointF.getInstance(vals[0], vals[1]); }
@Override public float getLowestVisibleX() { getTransformer(AxisDependency.LEFT).getValuesByTouchPoint(mViewPortHandler.contentLeft(), mViewPortHandler.contentBottom(), posForGetLowestVisibleX); float result = (float) Math.max(mXAxis.mAxisMinimum, posForGetLowestVisibleX.y); return result; }
@Override public float getLowestVisibleX() { getTransformer(AxisDependency.LEFT).getValuesByTouchPoint(mViewPortHandler.contentLeft(), mViewPortHandler.contentBottom(), posForGetLowestVisibleX); float result = (float) Math.max(mXAxis.mAxisMinimum, posForGetLowestVisibleX.y); return result; }
@Override public float getHighestVisibleX() { getTransformer(AxisDependency.LEFT).getValuesByTouchPoint(mViewPortHandler.contentLeft(), mViewPortHandler.contentTop(), posForGetHighestVisibleX); float result = (float) Math.min(mXAxis.mAxisMaximum, posForGetHighestVisibleX.y); return result; }
@Override public float getLowestVisibleX() { getTransformer(AxisDependency.LEFT).getValuesByTouchPoint(mViewPortHandler.contentLeft(), mViewPortHandler.contentBottom(), posForGetLowestVisibleX); float result = (float) Math.max(mXAxis.mAxisMinimum, posForGetLowestVisibleX.y); return result; }
@Override public float getHighestVisibleX() { getTransformer(AxisDependency.LEFT).getValuesByTouchPoint(mViewPortHandler.contentLeft(), mViewPortHandler.contentTop(), posForGetHighestVisibleX); float result = (float) Math.min(mXAxis.mAxisMaximum, posForGetHighestVisibleX.y); return result; }
@Override public float getLowestVisibleX() { getTransformer(AxisDependency.LEFT).getValuesByTouchPoint(mViewPortHandler.contentLeft(), mViewPortHandler.contentBottom(), posForGetLowestVisibleX); float result = (float) Math.max(mXAxis.mAxisMinimum, posForGetLowestVisibleX.y); return result; }
@Override public float getHighestVisibleX() { getTransformer(AxisDependency.LEFT).getValuesByTouchPoint(mViewPortHandler.contentLeft(), mViewPortHandler.contentTop(), posForGetHighestVisibleX); float result = (float) Math.min(mXAxis.mAxisMaximum, posForGetHighestVisibleX.y); return result; }
@Override public float getHighestVisibleX() { getTransformer(AxisDependency.LEFT).getValuesByTouchPoint(mViewPortHandler.contentLeft(), mViewPortHandler.contentTop(), posForGetHighestVisibleX); float result = (float) Math.min(mXAxis.mAxisMaximum, posForGetHighestVisibleX.y); return result; }
@Override public void getBarBounds(BarEntry e, RectF outputRect) { RectF bounds = outputRect; IBarDataSet set = mData.getDataSetForEntry(e); if (set == null) { outputRect.set(Float.MIN_VALUE, Float.MIN_VALUE, Float.MIN_VALUE, Float.MIN_VALUE); return; } float y = e.getY(); float x = e.getX(); float barWidth = mData.getBarWidth(); float top = x - barWidth / 2f; float bottom = x + barWidth / 2f; float left = y >= 0 ? y : 0; float right = y <= 0 ? y : 0; bounds.set(left, top, right, bottom); getTransformer(set.getAxisDependency()).rectValueToPixel(bounds); }
@Override public void getBarBounds(BarEntry e, RectF outputRect) { RectF bounds = outputRect; IBarDataSet set = mData.getDataSetForEntry(e); if (set == null) { outputRect.set(Float.MIN_VALUE, Float.MIN_VALUE, Float.MIN_VALUE, Float.MIN_VALUE); return; } float y = e.getY(); float x = e.getX(); float barWidth = mData.getBarWidth(); float top = x - barWidth / 2f; float bottom = x + barWidth / 2f; float left = y >= 0 ? y : 0; float right = y <= 0 ? y : 0; bounds.set(left, top, right, bottom); getTransformer(set.getAxisDependency()).rectValueToPixel(bounds); }
@Override public void getBarBounds(BarEntry e, RectF outputRect) { RectF bounds = outputRect; IBarDataSet set = mData.getDataSetForEntry(e); if (set == null) { outputRect.set(Float.MIN_VALUE, Float.MIN_VALUE, Float.MIN_VALUE, Float.MIN_VALUE); return; } float y = e.getY(); float x = e.getX(); float barWidth = mData.getBarWidth(); float top = x - barWidth / 2f; float bottom = x + barWidth / 2f; float left = y >= 0 ? y : 0; float right = y <= 0 ? y : 0; bounds.set(left, top, right, bottom); getTransformer(set.getAxisDependency()).rectValueToPixel(bounds); }
@Override public void getBarBounds(BarEntry e, RectF outputRect) { RectF bounds = outputRect; IBarDataSet set = mData.getDataSetForEntry(e); if (set == null) { outputRect.set(Float.MIN_VALUE, Float.MIN_VALUE, Float.MIN_VALUE, Float.MIN_VALUE); return; } float y = e.getY(); float x = e.getX(); float barWidth = mData.getBarWidth(); float top = x - barWidth / 2f; float bottom = x + barWidth / 2f; float left = y >= 0 ? y : 0; float right = y <= 0 ? y : 0; bounds.set(left, top, right, bottom); getTransformer(set.getAxisDependency()).rectValueToPixel(bounds); }
/** * Returns a recyclable MPPointF instance. * * @param e * @param axis * @return */ @Override public MPPointF getPosition(Entry e, AxisDependency axis) { if (e == null) return null; float[] vals = mGetPositionBuffer; vals[0] = e.getY(); vals[1] = e.getX(); getTransformer(axis).pointValuesToPixel(vals); return MPPointF.getInstance(vals[0], vals[1]); }
/** * Returns a recyclable MPPointF instance. * * @param e * @param axis * @return */ @Override public MPPointF getPosition(Entry e, AxisDependency axis) { if (e == null) return null; float[] vals = mGetPositionBuffer; vals[0] = e.getY(); vals[1] = e.getX(); getTransformer(axis).pointValuesToPixel(vals); return MPPointF.getInstance(vals[0], vals[1]); }
/** * Returns a recyclable MPPointF instance. * * @param e * @param axis * @return */ @Override public MPPointF getPosition(Entry e, AxisDependency axis) { if (e == null) return null; float[] vals = mGetPositionBuffer; vals[0] = e.getY(); vals[1] = e.getX(); getTransformer(axis).pointValuesToPixel(vals); return MPPointF.getInstance(vals[0], vals[1]); }
/** * Returns a recyclable MPPointF instance. * * @param e * @param axis * @return */ @Override public MPPointF getPosition(Entry e, AxisDependency axis) { if (e == null) { return null; } float[] vals = mGetPositionBuffer; vals[0] = e.getY(); vals[1] = e.getX(); getTransformer(axis).pointValuesToPixel(vals); return MPPointF.getInstance(vals[0], vals[1]); }