/** * Call this method to let the ChartData know that the underlying data has * changed. Calling this performs all necessary recalculations needed when * the contained data has changed. */ public void notifyDataChanged() { calcMinMax(); }
/** * Adds a DataSet dynamically. * * @param d */ public void addDataSet(T d) { if (d == null) return; calcMinMax(d); mDataSets.add(d); }
/** * Removes the given DataSet from this data object. Also recalculates all * minimum and maximum values. Returns true if a DataSet was removed, false * if no DataSet could be removed. * * @param d */ public boolean removeDataSet(T d) { if (d == null) return false; boolean removed = mDataSets.remove(d); // if a DataSet was removed if (removed) { calcMinMax(); } return removed; }
/** * Calc minimum and maximum y-values over all DataSets. * Tell DataSets to recalculate their min and max y-values, this is only needed for autoScaleMinMax. * * @param fromX the x-value to start the calculation from * @param toX the x-value to which the calculation should be performed */ public void calcMinMaxY(float fromX, float toX) { for (T set : mDataSets) { set.calcMinMaxY(fromX, toX); } // apply the new data calcMinMax(); }
/** * Removes the given Entry object from the DataSet at the specified index. * * @param e * @param dataSetIndex */ public boolean removeEntry(Entry e, int dataSetIndex) { // entry null, outofbounds if (e == null || dataSetIndex >= mDataSets.size()) return false; IDataSet set = mDataSets.get(dataSetIndex); if (set != null) { // remove the entry from the dataset boolean removed = set.removeEntry(e); if (removed) { calcMinMax(); } return removed; } else return false; }
/** * Adds an Entry to the DataSet at the specified index. * Entries are added to the end of the list. * * @param e * @param dataSetIndex */ public void addEntry(Entry e, int dataSetIndex) { if (mDataSets.size() > dataSetIndex && dataSetIndex >= 0) { IDataSet set = mDataSets.get(dataSetIndex); // add the entry to the dataset if (!set.addEntry(e)) return; calcMinMax(e, set.getAxisDependency()); } else { Log.e("addEntry", "Cannot add Entry because dataSetIndex too high or too low."); } }
/** * Call this method to let the ChartData know that the underlying data has * changed. Calling this performs all necessary recalculations needed when * the contained data has changed. */ public void notifyDataChanged() { calcMinMax(); }
/** * Call this method to let the ChartData know that the underlying data has * changed. Calling this performs all necessary recalculations needed when * the contained data has changed. */ public void notifyDataChanged() { calcMinMax(); }
/** * Call this method to let the ChartData know that the underlying data has * changed. Calling this performs all necessary recalculations needed when * the contained data has changed. */ public void notifyDataChanged() { calcMinMax(); }
/** * Call this method to let the ChartData know that the underlying data has * changed. Calling this performs all necessary recalculations needed when * the contained data has changed. */ public void notifyDataChanged() { calcMinMax(); }
/** * Adds a DataSet dynamically. * * @param d */ public void addDataSet(T d) { if (d == null) { return; } calcMinMax(d); mDataSets.add(d); }
/** * Adds a DataSet dynamically. * * @param d */ public void addDataSet(T d) { if (d == null) return; calcMinMax(d); mDataSets.add(d); }
/** * Adds a DataSet dynamically. * * @param d */ public void addDataSet(T d) { if (d == null) return; calcMinMax(d); mDataSets.add(d); }
/** * Adds a DataSet dynamically. * * @param d */ public void addDataSet(T d) { if (d == null) return; calcMinMax(d); mDataSets.add(d); }
/** * Calc minimum and maximum y-values over all DataSets. * Tell DataSets to recalculate their min and max y-values, this is only needed for autoScaleMinMax. * * @param fromX the x-value to start the calculation from * @param toX the x-value to which the calculation should be performed */ public void calcMinMaxY(float fromX, float toX) { for (T set : mDataSets) { set.calcMinMaxY(fromX, toX); } // apply the new data calcMinMax(); }
/** * Calc minimum and maximum y-values over all DataSets. * Tell DataSets to recalculate their min and max y-values, this is only needed for autoScaleMinMax. * * @param fromX the x-value to start the calculation from * @param toX the x-value to which the calculation should be performed */ public void calcMinMaxY(float fromX, float toX) { for (T set : mDataSets) { set.calcMinMaxY(fromX, toX); } // apply the new data calcMinMax(); }
/** * Calc minimum and maximum y-values over all DataSets. * Tell DataSets to recalculate their min and max y-values, this is only needed for autoScaleMinMax. * * @param fromX the x-value to start the calculation from * @param toX the x-value to which the calculation should be performed */ public void calcMinMaxY(float fromX, float toX) { for (T set : mDataSets) { set.calcMinMaxY(fromX, toX); } // apply the new data calcMinMax(); }
/** * Calc minimum and maximum y-values over all DataSets. * Tell DataSets to recalculate their min and max y-values, this is only needed for autoScaleMinMax. * * @param fromX the x-value to start the calculation from * @param toX the x-value to which the calculation should be performed */ public void calcMinMaxY(float fromX, float toX) { for (T set : mDataSets) { set.calcMinMaxY(fromX, toX); } // apply the new data calcMinMax(); }