@Override
    public void setCurrentViewportWithAnimation(Viewport targetViewport, long duration) {
        if (null != targetViewport) {
            viewportAnimator.cancelAnimation();
            viewportAnimator.startAnimation(getCurrentViewport(), targetViewport, duration);
        }
        ViewCompat.postInvalidateOnAnimation(this);
    }
Abstract class for charts views.

@author Leszek Wach
hellocharts-library/src/lecho/lib/hellocharts/view/AbstractChartView.java