                 for j in 0 ..< Int(ceil(Double(dataSet.count) * animator.phaseX)) {
                     guard let e = dataSet[j] as? BarChartDataEntry else { continue }
 
-                    let rect = buffer.rects[j]
+                    let rect = buffer[j]
 
                     let y = rect.origin.y + rect.size.height / 2.0
 

                barRect.origin.y = top
                barRect.size.height = bottom - top

                buffer.rects[bufferIndex] = barRect
                bufferIndex += 1
            } else {
                var posY = 0.0

                    barRect.origin.y = top
                    barRect.size.height = bottom - top

                    _buffers[index][bufferIndex] = barRect
                    bufferIndex += 1
                }
            }
