本文整理汇总了Java中com.github.mikephil.charting.interfaces.datasets.IDataSet.addEntry方法的典型用法代码示例。如果您正苦于以下问题:Java IDataSet.addEntry方法的具体用法?Java IDataSet.addEntry怎么用?Java IDataSet.addEntry使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类com.github.mikephil.charting.interfaces.datasets.IDataSet
的用法示例。
在下文中一共展示了IDataSet.addEntry方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: addEntry
import com.github.mikephil.charting.interfaces.datasets.IDataSet; //导入方法依赖的package包/类
/**
* 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.");
}
}
示例2: addEntry
import com.github.mikephil.charting.interfaces.datasets.IDataSet; //导入方法依赖的package包/类
/**
* 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;
float val = e.getVal();
if (mYValCount == 0) {
mYMin = val;
mYMax = val;
if (set.getAxisDependency() == AxisDependency.LEFT) {
mLeftAxisMax = e.getVal();
mLeftAxisMin = e.getVal();
} else {
mRightAxisMax = e.getVal();
mRightAxisMin = e.getVal();
}
} else {
if (mYMax < val)
mYMax = val;
if (mYMin > val)
mYMin = val;
if (set.getAxisDependency() == AxisDependency.LEFT) {
if (mLeftAxisMax < e.getVal())
mLeftAxisMax = e.getVal();
if (mLeftAxisMin > e.getVal())
mLeftAxisMin = e.getVal();
} else {
if (mRightAxisMax < e.getVal())
mRightAxisMax = e.getVal();
if (mRightAxisMin > e.getVal())
mRightAxisMin = e.getVal();
}
}
mYValCount += 1;
handleEmptyAxis(getFirstLeft(), getFirstRight());
} else {
Log.e("addEntry", "Cannot add Entry because dataSetIndex too high or too low.");
}
}
示例3: addEntry
import com.github.mikephil.charting.interfaces.datasets.IDataSet; //导入方法依赖的package包/类
/**
* 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;
float val = e.getVal();
if (mYValCount == 0) {
mYMin = val;
mYMax = val;
if (set.getAxisDependency() == YAxis.AxisDependency.LEFT) {
mLeftAxisMax = e.getVal();
mLeftAxisMin = e.getVal();
} else {
mRightAxisMax = e.getVal();
mRightAxisMin = e.getVal();
}
} else {
if (mYMax < val)
mYMax = val;
if (mYMin > val)
mYMin = val;
if (set.getAxisDependency() == YAxis.AxisDependency.LEFT) {
if (mLeftAxisMax < e.getVal())
mLeftAxisMax = e.getVal();
if (mLeftAxisMin > e.getVal())
mLeftAxisMin = e.getVal();
} else {
if (mRightAxisMax < e.getVal())
mRightAxisMax = e.getVal();
if (mRightAxisMin > e.getVal())
mRightAxisMin = e.getVal();
}
}
mYValCount += 1;
handleEmptyAxis(getFirstLeft(), getFirstRight());
} else {
Log.e("addEntry", "Cannot add Entry because dataSetIndex too high or too low.");
}
}