/** * Checks if the provided entry object is in bounds for drawing considering the current animation phase. * * @param e * @param set * @return */ protected boolean isInBoundsX(Entry e, IBarLineScatterCandleBubbleDataSet set) { if (e == null) return false; float entryIndex = set.getEntryIndex(e); if (e == null || entryIndex >= set.getEntryCount() * mAnimator.getPhaseX()) { return false; } else { return true; } }
/** * Calculates the minimum and maximum x values as well as the range between them. * * @param chart * @param dataSet */ public void set(BarLineScatterCandleBubbleDataProvider chart, IBarLineScatterCandleBubbleDataSet dataSet) { float phaseX = Math.max(0.f, Math.min(1.f, mAnimator.getPhaseX())); float low = chart.getLowestVisibleX(); float high = chart.getHighestVisibleX(); Entry entryFrom = dataSet.getEntryForXValue(low, Float.NaN, DataSet.Rounding.DOWN); Entry entryTo = dataSet.getEntryForXValue(high, Float.NaN, DataSet.Rounding.UP); min = entryFrom == null ? 0 : dataSet.getEntryIndex(entryFrom); max = entryTo == null ? 0 : dataSet.getEntryIndex(entryTo); range = (int) ((max - min) * phaseX); } }
/** * Checks if the provided entry object is in bounds for drawing considering the current animation phase. * * @param e * @param set * @return */ protected boolean isInBoundsX(Entry e, IBarLineScatterCandleBubbleDataSet set) { if (e == null) return false; float entryIndex = set.getEntryIndex(e); if (e == null || entryIndex >= set.getEntryCount() * mAnimator.getPhaseX()) { return false; } else { return true; } }
/** * Calculates the minimum and maximum x values as well as the range between them. * * @param chart * @param dataSet */ public void set(BarLineScatterCandleBubbleDataProvider chart, IBarLineScatterCandleBubbleDataSet dataSet) { float phaseX = Math.max(0.f, Math.min(1.f, mAnimator.getPhaseX())); float low = chart.getLowestVisibleX(); float high = chart.getHighestVisibleX(); Entry entryFrom = dataSet.getEntryForXValue(low, Float.NaN, DataSet.Rounding.DOWN); Entry entryTo = dataSet.getEntryForXValue(high, Float.NaN, DataSet.Rounding.UP); min = entryFrom == null ? 0 : dataSet.getEntryIndex(entryFrom); max = entryTo == null ? 0 : dataSet.getEntryIndex(entryTo); range = (int) ((max - min) * phaseX); } }
/** * Checks if the provided entry object is in bounds for drawing considering the current animation phase. * * @param e * @param set * @return */ protected boolean isInBoundsX(Entry e, IBarLineScatterCandleBubbleDataSet set) { if (e == null) return false; float entryIndex = set.getEntryIndex(e); if (e == null || entryIndex >= set.getEntryCount() * mAnimator.getPhaseX()) { return false; } else { return true; } }
/** * Calculates the minimum and maximum x values as well as the range between them. * * @param chart * @param dataSet */ public void set(BarLineScatterCandleBubbleDataProvider chart, IBarLineScatterCandleBubbleDataSet dataSet) { float phaseX = Math.max(0.f, Math.min(1.f, mAnimator.getPhaseX())); float low = chart.getLowestVisibleX(); float high = chart.getHighestVisibleX(); Entry entryFrom = dataSet.getEntryForXValue(low, Float.NaN, DataSet.Rounding.DOWN); Entry entryTo = dataSet.getEntryForXValue(high, Float.NaN, DataSet.Rounding.UP); min = entryFrom == null ? 0 : dataSet.getEntryIndex(entryFrom); max = entryTo == null ? 0 : dataSet.getEntryIndex(entryTo); range = (int) ((max - min) * phaseX); } }
/** * Checks if the provided entry object is in bounds for drawing considering the current animation phase. * * @param e * @param set * @return */ protected boolean isInBoundsX(Entry e, IBarLineScatterCandleBubbleDataSet set) { if (e == null) return false; float entryIndex = set.getEntryIndex(e); if (e == null || entryIndex >= set.getEntryCount() * mAnimator.getPhaseX()) { return false; } else { return true; } }
/** * Calculates the minimum and maximum x values as well as the range between them. * * @param chart * @param dataSet */ public void set(BarLineScatterCandleBubbleDataProvider chart, IBarLineScatterCandleBubbleDataSet dataSet) { float phaseX = Math.max(0.f, Math.min(1.f, mAnimator.getPhaseX())); float low = chart.getLowestVisibleX(); float high = chart.getHighestVisibleX(); Entry entryFrom = dataSet.getEntryForXValue(low, Float.NaN, DataSet.Rounding.DOWN); Entry entryTo = dataSet.getEntryForXValue(high, Float.NaN, DataSet.Rounding.UP); min = entryFrom == null ? 0 : dataSet.getEntryIndex(entryFrom); max = entryTo == null ? 0 : dataSet.getEntryIndex(entryTo); range = (int) ((max - min) * phaseX); } }
/** * Checks if the provided entry object is in bounds for drawing considering the current animation phase. * * @param e * @param set * @return */ protected boolean isInBoundsX(Entry e, IBarLineScatterCandleBubbleDataSet set) { if (e == null) { return false; } float entryIndex = set.getEntryIndex(e); if (e == null || entryIndex >= set.getEntryCount() * mAnimator.getPhaseX()) { return false; } else { return true; } }
/** * Calculates the minimum and maximum x values as well as the range between them. * * @param chart * @param dataSet */ public void set(BarLineScatterCandleBubbleDataProvider chart, IBarLineScatterCandleBubbleDataSet dataSet) { float phaseX = Math.max(0.f, Math.min(1.f, mAnimator.getPhaseX())); float low = chart.getLowestVisibleX(); float high = chart.getHighestVisibleX(); Entry entryFrom = dataSet.getEntryForXValue(low, Float.NaN, DataSet.Rounding.DOWN); Entry entryTo = dataSet.getEntryForXValue(high, Float.NaN, DataSet.Rounding.UP); min = entryFrom == null ? 0 : dataSet.getEntryIndex(entryFrom); max = entryTo == null ? 0 : dataSet.getEntryIndex(entryTo); range = (int) ((max - min) * phaseX); } }