Search in sources :

Example 1 with ChartAnimationListener

use of com.db.chart.animation.ChartAnimationListener in project WilliamChart by diogobernardino.

the class ChartView method init.

private void init() {
    mReadyToDraw = false;
    mThresholdStartValues = new ArrayList<>();
    mThresholdEndValues = new ArrayList<>();
    mThresholdStartLabels = new ArrayList<>();
    mThresholdEndLabels = new ArrayList<>();
    mIsDrawing = false;
    data = new ArrayList<>();
    mRegions = new ArrayList<>();
    mAnimListener = new ChartAnimationListener() {

        @Override
        public boolean onAnimationUpdate(ArrayList<ChartSet> data) {
            if (!mIsDrawing) {
                addData(data);
                postInvalidate();
                return true;
            }
            return false;
        }
    };
}
Also used : ChartSet(com.db.chart.model.ChartSet) ChartAnimationListener(com.db.chart.animation.ChartAnimationListener)

Aggregations

ChartAnimationListener (com.db.chart.animation.ChartAnimationListener)1 ChartSet (com.db.chart.model.ChartSet)1