I'm working on an iPhone app which graphs a large database, accessed through core-data, in a line-chart. I'm using a tile-based approach to rendering this graph. The distance between datapoints is irregular.
Each tile uses a predicate to retrieve the data that is relevant for that tile:
NSPredicate* predicate = [NSPredicate predicateWithFormat:@"creationDate > %@ AND creationDate < %@",tileBeginDate, tileEndDate];
[request setPredicate:predicate];
NSMutableArray *result = [[managedObjectContext executeFetchRequest:request error:&error] mutableCopy];
I have a problem when drawing the lines between datapoints residing in different tiles, since the drawing of this line requires a datapoint outside of the range of the tile.
Ideally, I would want to be able to get one datapoint beyond the requested range in core data. Is there any way to do this? If not, any other suggestions?