当前位置: 首页>>代码示例>>Java>>正文


Java IDataSet.addEntry方法代码示例

本文整理汇总了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.");
    }
}
 
开发者ID:weiwenqiang,项目名称:GitHub,代码行数:23,代码来源:ChartData.java

示例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.");
    }
}
 
开发者ID:rahulmaddineni,项目名称:Stayfit,代码行数:60,代码来源:ChartData.java

示例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.");
    }
}
 
开发者ID:muyoumumumu,项目名称:QuShuChe,代码行数:60,代码来源:ChartData.java


注:本文中的com.github.mikephil.charting.interfaces.datasets.IDataSet.addEntry方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。