I am trying to make a chart that will continuously shift the data to the left and add on new data on the right. It's a pretty simple design, 6 chart lines, 250 data points each. I have it working, but each refresh of data takes over a second to accomplish and uses 100% of the CPU. It specifically on the updateItemAtIndex call (or the replaceItemAtIndex).
Does anyone know a way to do these efficiently?
Thanks,
Jon
Max,
Thanks for the sample code! That really did the trick. I was not using those methods and now that I am the CPU load is back down in the 25 - 30% range.
Thanks again,
Hi Jon,
The updates should be pretty quick and with 6x250 points, it shouldn't be that much of a load on the CPU.
Here's a quick sample that demos this. I'm updating every tenth of a second. Try it out and let me know if you're still having a performance slowdown.By the way, what device are you using?
-Max