Java Code Examples for com.github.mikephil.charting.interfaces.datasets.IBarLineScatterCandleBubbleDataSet#getEntryIndex()
The following examples show how to use
com.github.mikephil.charting.interfaces.datasets.IBarLineScatterCandleBubbleDataSet#getEntryIndex() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: BarLineScatterCandleBubbleRenderer.java From StockChart-MPAndroidChart with MIT License | 5 votes |
/** * 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; } }
Example 2
Source File: BarLineScatterCandleBubbleRenderer.java From StockChart-MPAndroidChart with MIT License | 5 votes |
/** * 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); }
Example 3
Source File: BarLineScatterCandleBubbleRenderer.java From Ticket-Analysis with MIT License | 5 votes |
/** * 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; } }
Example 4
Source File: BarLineScatterCandleBubbleRenderer.java From Ticket-Analysis with MIT License | 5 votes |
/** * 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); }
Example 5
Source File: BarLineScatterCandleBubbleRenderer.java From android-kline with Apache License 2.0 | 5 votes |
/** * 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; } }
Example 6
Source File: BarLineScatterCandleBubbleRenderer.java From android-kline with Apache License 2.0 | 5 votes |
/** * 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); }