This question is locked. New answers and comments are not allowed.
I have noticed that the position of a chart on screen obviously depends on the incoming data:
See below the 4 screenshots and how they are initialised:
Screenshot A:
Screenshot B:
Screenshot C:
Screenshot D:
As one can see, screenshot A and D are configured identically, but as the incoming data is different, the position of the chart is different.
Screenshot B's and C's configuration have been modified to fit better on screen.
Screenshot D is especially problematic, as the right-most date on the x-axes is clipped.
How do I initialise the chart correctly, so that charts with different incoming data still are positioned same, and without clipping?
TKChart *chart = [[TKChart alloc] initWithFrame:CGRectInset(self.view.bounds, 10, 10)];
TKChart *chart = [[TKChart alloc] initWithFrame:CGRectOffset(CGRectInset(self.view.bounds, 5, 10), -15, 10)];
TKChart *chart = [[TKChart alloc] initWithFrame:CGRectOffset(CGRectInset(self.view.bounds, 5, 10), -15, 10)];
TKChart *chart = [[TKChart alloc] initWithFrame:CGRectInset(self.view.bounds, 10, 10)];
See below the 4 screenshots and how they are initialised:
Screenshot A:
Screenshot B:
Screenshot C:
Screenshot D:
As one can see, screenshot A and D are configured identically, but as the incoming data is different, the position of the chart is different.
Screenshot B's and C's configuration have been modified to fit better on screen.
Screenshot D is especially problematic, as the right-most date on the x-axes is clipped.
How do I initialise the chart correctly, so that charts with different incoming data still are positioned same, and without clipping?
TKChart *chart = [[TKChart alloc] initWithFrame:CGRectInset(self.view.bounds, 10, 10)];
TKChart *chart = [[TKChart alloc] initWithFrame:CGRectOffset(CGRectInset(self.view.bounds, 5, 10), -15, 10)];
TKChart *chart = [[TKChart alloc] initWithFrame:CGRectOffset(CGRectInset(self.view.bounds, 5, 10), -15, 10)];
TKChart *chart = [[TKChart alloc] initWithFrame:CGRectInset(self.view.bounds, 10, 10)];