The problem here is pretty simple but I just can’t quite figure it out.
I have a CPTXYGraph, the X axis is integers between 1 and 100, the Y axis is dates. There will be 50-100 dates in the graph, I’d like to initially display only the last 7 days and allow the user to scroll backwards if he would like.
How can I do this? No matter what I try the graph starts at Day 1 and forces the user to scroll right.
Ooops, figured it out, I’m a dummy.
Since the x Axis is 1 day (and I didn’t mention this earlier but there can be multiple points for a day), I have a value called “oneDay” that represents seconds in a day. When you set the xRange doing this:
will move the graph 6 days to the right (from the beginning of the graph.) So I just have to figure out how far I’d like to move the graph.