SSS
SSS

Reputation: 119

Core Plot Reload Data

Beginner in Core Plot,I'm trying to plot real time graph using core plot where the data comes every 0.3 second and I am plotting for about 1 hour duration. Now every time when the reload data method is called does core plot start plotting the graph all over or only the newly appended point in the datasource is considered?What I am targeting is only the newly appended point to be reloaded to be plotted on the plot and the rest points in datasource already plotted without reloading.

Upvotes: 0

Views: 170

Answers (1)

Eric Skroch
Eric Skroch

Reputation: 27381

You have several options for updating the plot data:

  • -reloadData: Queries the datasource for all of the data points.
  • -insertDataAtIndex:numberOfRecords:: Insert records into the plot data cache at the given index. The datasource is only queried for the new data. Use a starting index equal to the old data count to append records to the end of the existing data set.
  • -reloadDataInIndexRange:: Refresh only the data points in the given range.
  • -deleteDataInIndexRange:: Removes existing data int the given range.

Upvotes: 1

Related Questions