Cumulative Chart

I did manage to do this once. I used a snippet to accumulate the current value with the previous value(s). Looking for the code I wrote.