Buggy code:
} if ( ! ( isMinXSet [ scale ] ) ) { double minimumX = series . getMinX ( ) ; minX [ scale ] = Math . min ( minX [ scale ] , minimumX ) ; mCalcRange . get ( scale ) [ 0 ] = minX [ scale ] ; } if ( ! ( isMaxXSet [ scale ] ) ) { double maximumX = series . getMaxX ( ) ; maxX [ scale ] = Math . max ( maxX [ scale ] , maximumX ) ; mCalcRange . get ( scale ) [ 1 ] = maxX [ scale ] ; } if ( ! ( isMinYSet [ scale ] ) ) { double minimumY = series . getMinY ( ) ; minY [ scale ] = Math . min ( minY [ scale ] , ( ( float ) ( minimumY ) ) ) ; mCalcRange . get ( scale ) [ 2 ] = minY [ scale ] ; } if ( ! ( isMaxYSet [ scale ] ) ) { double maximumY = series . getMaxY ( ) ; maxY [ scale ] = Math . max ( maxY [ scale ] , ( ( float ) ( maximumY ) ) ) ; mCalcRange . get ( scale ) [ 3 ] = maxY [ scale ] ; } } for ( int i = 0 ; i < maxScaleNumber ; i ++ ) { if ( ( ( maxX [ i ] ) - ( minX [ i ] ) ) != 0 ) { xPixelsPerUnit [ i ] = ( right - left ) // ( ( maxX [ i ] ) - ( minX [ i ] ) ) ; } if ( ( ( maxY [ i ] ) - ( minY [ i ] ) ) != 0 ) { yPixelsPerUnit [ i ] = ( ( float ) ( ( bottom - top ) // ( ( maxY [ i ] ) - ( minY [ i ] ) ) ) ) ; } } boolean hasValues = false ; clickableAreas = new HashMap < Integer , List < ClickableArea > > ( ) ; for ( int i = 0 ; i < sLength ; i ++ ) { XYSeries series = mDataset . getSeriesAt ( i ) ; int scale = series . getScaleNumber ( ) ; if ( ( series . getItemCount ( ) ) == 0 ) { continue ; } hasValues = true ; SimpleSeriesRenderer seriesRenderer = mRenderer . getSeriesRendererAt ( i ) ; List < Float > points = new ArrayList < Float > ( ) ; List < Double > values = new ArrayList < Double > ( ) ; float yAxisValue = Math . min ( bottom , ( ( float ) ( bottom + ( ( yPixelsPerUnit [ scale ] ) * ( minY [ scale ] ) ) ) ) ) ; LinkedList < ClickableArea > clickableArea = new LinkedList < ClickableArea > ( ) ; clickableAreas . put ( i , clickableArea ) ; SortedMap < Double , Double > range = series . getRange ( minX [ scale ] , maxX [ scale ] , 1 ) ; for ( Map . Entry < Double , Double > value : range . entrySet ( ) ) { double xValue = value . getKey ( ) ; double yValue = value . getValue ( ) ; values . add ( value . getKey ( ) ) ; values . add ( value . getValue ( ) ) ; <START_BUG> if ( yValue != ( MathHelper . NULL_VALUE ) ) { <END_BUG> points . add ( ( ( float ) ( left + ( ( xPixelsPerUnit [ scale ] ) * ( xValue - ( minX [ scale ] ) ) ) ) ) ) ; points . add ( ( ( float ) ( bottom - ( ( yPixelsPerUnit [ scale ] ) * ( yValue - ( minY [ scale ] ) ) ) ) ) ) ; } else if ( isRenderNullValues ( ) ) { points . add ( ( ( float ) ( left + ( ( xPixelsPerUnit [ scale ] ) * ( xValue - ( minX [ scale ] ) ) ) ) ) ) ; points . add ( ( ( float ) ( bottom - ( ( yPixelsPerUnit [ scale ] ) * ( - ( minY [ scale ] ) ) ) ) ) ) ; } else { if ( ( points . size ( ) ) > 0 ) { drawSeries ( series , canvas , paint , points , seriesRenderer , yAxisValue , i , or ) ; ClickableArea [ ] clickableAreasForSubSeries = clickableAreasForPoints ( MathHelper . getFloats ( points ) , MathHelper . getDoubles ( values ) , yAxisValue , i ) ; clickableArea . addAll ( Arrays . asList ( clickableAreasForSubSeries ) ) ; points . clear ( ) ; values . clear ( ) ; } clickableArea . add ( null ) ; } } if ( ( points . size ( ) ) > 0 ) { drawSeries ( series , canvas , paint , points , seriesRenderer , yAxisValue , i , or ) ; ClickableArea [ ] clickableAreasForSubSeries = clickableAreasForPoints ( MathHelper . getFloats ( points ) , MathHelper . getDoubles ( values ) , yAxisValue , i ) ; clickableArea . addAll ( Arrays . asList ( clickableAreasForSubSeries ) ) ; } } drawBackground ( mRenderer , canvas , x , bottom , width , ( height - bottom ) , paint , true , mRenderer . getMarginsColor ( ) ) ; drawBackground ( mRenderer , canvas , x , y , width , margins [ 0 ] , paint , true , mRenderer . getMarginsColor ( ) ) ;

Fix:
if ( ! ( isNullValue ( yValue ) ) ) {