         
         var size = Int(ceil(CGFloat(maxx - minx) * phaseX + CGFloat(minx)));
         
-        minx = max(minx - 2, 0); // Decrement by 2 as we always render two extra points to keep cubic flowing
-        size = min(size + 2, entries.count); // Increment by 1 as we always render two extra points to keep cubic flowing
-        
         if (size - minx >= 2)
         {
             var prevDx: CGFloat = 0.0;

            prevDy = CGFloat(next.value - cur.value) * intensity;
            
            cur = entries[minx + 1];
            next = entries[minx + (size - minx > 2 ? 2 : 1)];
            curDx = CGFloat(next.xIndex - prev.xIndex) * intensity;
            curDy = CGFloat(next.value - prev.value) * intensity;
            
            // the first cubic
            CGPathAddCurveToPoint(cubicPath, &valueToPixelMatrix, CGFloat(prev.xIndex) + prevDx, (CGFloat(prev.value) + prevDy) * phaseY, CGFloat(cur.xIndex) - curDx, (CGFloat(cur.value) - curDy) * phaseY, CGFloat(cur.xIndex), CGFloat(cur.value) * phaseY);
            
            for (var j = minx + 2; j < size - 1; j++)
            {
                prevPrev = entries[j - 2];
                prev = entries[j - 1];

                    (CGFloat(cur.value) - curDy) * phaseY, CGFloat(cur.xIndex), CGFloat(cur.value) * phaseY);
            }
        }
        
        CGContextSaveGState(context);
        
