/** * Returns the labels of all DataSets as a string array. * * @return */ public String[] getDataSetLabels() { String[] types = new String[mDataSets.size()]; for (int i = 0; i < mDataSets.size(); i++) { types[i] = mDataSets.get(i).getLabel(); } return types; }
/** * Retrieve the index of a DataSet with a specific label from the ChartData. * Search can be case sensitive or not. IMPORTANT: This method does * calculations at runtime, do not over-use in performance critical * situations. * * @param dataSets the DataSet array to search * @param label * @param ignorecase if true, the search is not case-sensitive * @return */ protected int getDataSetIndexByLabel(List<T> dataSets, String label, boolean ignorecase) { if (ignorecase) { for (int i = 0; i < dataSets.size(); i++) if (label.equalsIgnoreCase(dataSets.get(i).getLabel())) return i; } else { for (int i = 0; i < dataSets.size(); i++) if (label.equals(dataSets.get(i).getLabel())) return i; } return -1; }
/** * Returns the labels of all DataSets as a string array. * * @return */ public String[] getDataSetLabels() { String[] types = new String[mDataSets.size()]; for (int i = 0; i < mDataSets.size(); i++) { types[i] = mDataSets.get(i).getLabel(); } return types; }
/** * Returns the labels of all DataSets as a string array. * * @return */ public String[] getDataSetLabels() { String[] types = new String[mDataSets.size()]; for (int i = 0; i < mDataSets.size(); i++) { types[i] = mDataSets.get(i).getLabel(); } return types; }
/** * Returns the labels of all DataSets as a string array. * * @return */ public String[] getDataSetLabels() { String[] types = new String[mDataSets.size()]; for (int i = 0; i < mDataSets.size(); i++) { types[i] = mDataSets.get(i).getLabel(); } return types; }
/** * Returns the labels of all DataSets as a string array. * * @return */ public String[] getDataSetLabels() { String[] types = new String[mDataSets.size()]; for (int i = 0; i < mDataSets.size(); i++) { types[i] = mDataSets.get(i).getLabel(); } return types; }
/** * Retrieve the index of a DataSet with a specific label from the ChartData. * Search can be case sensitive or not. IMPORTANT: This method does * calculations at runtime, do not over-use in performance critical * situations. * * @param dataSets the DataSet array to search * @param label * @param ignorecase if true, the search is not case-sensitive * @return */ protected int getDataSetIndexByLabel(List<T> dataSets, String label, boolean ignorecase) { if (ignorecase) { for (int i = 0; i < dataSets.size(); i++) if (label.equalsIgnoreCase(dataSets.get(i).getLabel())) return i; } else { for (int i = 0; i < dataSets.size(); i++) if (label.equals(dataSets.get(i).getLabel())) return i; } return -1; }
/** * Retrieve the index of a DataSet with a specific label from the ChartData. * Search can be case sensitive or not. IMPORTANT: This method does * calculations at runtime, do not over-use in performance critical * situations. * * @param dataSets the DataSet array to search * @param label * @param ignorecase if true, the search is not case-sensitive * @return */ protected int getDataSetIndexByLabel(List<T> dataSets, String label, boolean ignorecase) { if (ignorecase) { for (int i = 0; i < dataSets.size(); i++) if (label.equalsIgnoreCase(dataSets.get(i).getLabel())) return i; } else { for (int i = 0; i < dataSets.size(); i++) if (label.equals(dataSets.get(i).getLabel())) return i; } return -1; }
/** * Retrieve the index of a DataSet with a specific label from the ChartData. * Search can be case sensitive or not. IMPORTANT: This method does * calculations at runtime, do not over-use in performance critical * situations. * * @param dataSets the DataSet array to search * @param label * @param ignorecase if true, the search is not case-sensitive * @return */ protected int getDataSetIndexByLabel(List<T> dataSets, String label, boolean ignorecase) { if (ignorecase) { for (int i = 0; i < dataSets.size(); i++) if (label.equalsIgnoreCase(dataSets.get(i).getLabel())) return i; } else { for (int i = 0; i < dataSets.size(); i++) if (label.equals(dataSets.get(i).getLabel())) return i; } return -1; }
/** * Retrieve the index of a DataSet with a specific label from the ChartData. * Search can be case sensitive or not. IMPORTANT: This method does * calculations at runtime, do not over-use in performance critical * situations. * * @param dataSets the DataSet array to search * @param label * @param ignorecase if true, the search is not case-sensitive * @return */ protected int getDataSetIndexByLabel(List<T> dataSets, String label, boolean ignorecase) { if (ignorecase) { for (int i = 0; i < dataSets.size(); i++) { if (label.equalsIgnoreCase(dataSets.get(i).getLabel())) { return i; } } } else { for (int i = 0; i < dataSets.size(); i++) { if (label.equals(dataSets.get(i).getLabel())) { return i; } } } return -1; }