question: protected void drawHorizontalBezier ( Canvas c , ILineDataSet dataSet ) { Transformer trans = mChart . getTransformer ( dataSet . getAxisDependency ( ) ) ; int entryCount = dataSet . getEntryCount ( ) ; Entry entryFrom = dataSet . getEntryForXIndex ( ( mMinX < 0 ) ? 0 : mMinX , DataSet . Rounding . DOWN ) ; Entry entryTo = dataSet . getEntryForXIndex ( mMaxX , DataSet . Rounding . UP ) ; int diff = ( entryFrom == entryTo ) ? 1 : 0 ; int minx = Math . max ( dataSet . getEntryIndex ( entryFrom ) - diff , 0 ) ; int maxx = Math . min ( Math . max ( minx + 2 , dataSet . getEntryIndex ( entryTo ) + 1 ) , entryCount ) ; float phaseX = Math . max ( 0.f , Math . min ( 1.f , mAnimator . getPhaseX ( ) ) ) ; float phaseY = mAnimator . getPhaseY ( ) ; cubicPath . reset ( ) ; int size = ( int ) Math . ceil ( ( maxx - minx ) * phaseX + minx ) ; if ( size - minx >= 2 ) { Entry prev = dataSet . getEntryForIndex ( minx ) ; Entry cur = prev ; cubicPath . moveTo ( cur . getXIndex ( ) , cur . getVal ( ) * phaseY ) ; for ( int j = minx + 1 , count = Math . min ( size , entryCount ) ; j < count ; j ++ ) { prev = dataSet . getEntryForIndex ( j - 1 ) ; cur = dataSet . getEntryForIndex ( j ) ; final float cpx = ( float ) ( prev . getXIndex ( ) ) + ( float ) ( cur . getXIndex ( ) - prev . getXIndex ( ) ) / 2.0f ; cubicPath . cubicTo ( cpx , prev . getVal ( ) * phaseY , cpx , cur . getVal ( ) * phaseY , cur . getXIndex ( ) , cur . getVal ( ) * phaseY ) ; } } if ( dataSet . isDrawFilledEnabled ( ) ) { cubicFillPath . reset ( ) ; cubicFillPath . addPath ( cubicPath ) ; drawCubicFill ( mBitmapCanvas , dataSet , cubicFillPath , trans , minx , size ) ; } mRenderPaint . setColor ( dataSet . getColor ( ) ) ; mRenderPaint . setStyle ( Paint . Style . STROKE ) ; trans . pathValueToPixel ( cubicPath ) ; mBitmapCanvas . drawPath ( cubicPath , mRenderPaint ) ; mRenderPaint . setPathEffect ( null ) ; }
target:  Draws a cubic line.