Java Code Examples for com.github.mikephil.charting.data.DataSet#getEntryForXIndex()
The following examples show how to use
com.github.mikephil.charting.data.DataSet#getEntryForXIndex() .
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: Chart.java From iMoney with Apache License 2.0 | 4 votes |
/** * Get all Entry objects at the given index across all DataSets. * INFORMATION: This method does calculations at runtime. Do not over-use in * performance critical situations. * * @param xIndex * @return */ public List<Entry> getEntriesAtIndex(int xIndex) { List<Entry> vals = new ArrayList<Entry>(); for (int i = 0; i < mData.getDataSetCount(); i++) { DataSet<? extends Entry> set = mData.getDataSetByIndex(i); Entry e = set.getEntryForXIndex(xIndex); if (e != null) { vals.add(e); } } return vals; }
Example 2
Source File: Chart.java From Notification-Analyser with MIT License | 4 votes |
/** * Get all Entry objects at the given index across all DataSets. * INFORMATION: This method does calculations at runtime. Do not over-use in * performance critical situations. * * @param xIndex * @return */ public ArrayList<Entry> getEntriesAtIndex(int xIndex) { ArrayList<Entry> vals = new ArrayList<Entry>(); for (int i = 0; i < mCurrentData.getDataSetCount(); i++) { DataSet<? extends Entry> set = mCurrentData.getDataSetByIndex(i); Entry e = set.getEntryForXIndex(xIndex); if (e != null) { vals.add(e); } } return vals; }