Added smarter logic to setData, where instead of re-creating all the data points, existing points are updated. This allows animation, performs faster and is less prone to memory issues.