This is a migrated thread and some comments may be shown as answers.

Position of chart on screen obviously depends on the incoming data

4 Answers 35 Views
Chart
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Michael
Top achievements
Rank 1
Michael asked on 18 Jul 2014, 11:31 AM
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)];




4 Answers, 1 is accepted

Sort by
0
Jack
Telerik team
answered on 21 Jul 2014, 12:28 PM
Hi Michael,

Please find the answer to your question in your support ticket regarding the same issue. 

A bit off topic, I would kindly ask you to avoid posting the same question twice. This may hinder tracking the issue and may slow down our response.

Should you have other questions, do not hesitate to ask.

Regards,
Jack
Telerik
 

Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

 
0
Michael
Top achievements
Rank 1
answered on 21 Jul 2014, 04:44 PM
Sorry, my fault. Will not happen again...
Michael
0
Klaus
Top achievements
Rank 1
answered on 03 Jun 2016, 06:55 AM

Hi,

I'm interested too in knowing how to give a precise position to the chart. 

Related to this: in my line chart I've hidden all the axis labels, and I want to recover the space under the x axis, so the chart is nearer to the bottom of the view. Is it possible?

Thanks a lot

0
Deyan
Telerik team
answered on 07 Jun 2016, 11:48 AM
Hi Klaus,

The variable chart position depends most probably on the axis labels being different for different data types. You can try the following:

Cut the entire last label by setting the maxLabelClippingMode property toTKChartAxisClippingModeHidden:

axis.style.labelStyle.maxLabelClippingMode = TKChartAxisClippingModeHidden;

If this doesn't help, I would like to ask you to open a new support ticket and attach a ZIP archive with your project that will help us reproduce the scenario and see how we can help.

Thanks for your time.

Regards,
Deyan
Telerik
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
Tags
Chart
Asked by
Michael
Top achievements
Rank 1
Answers by
Jack
Telerik team
Michael
Top achievements
Rank 1
Klaus
Top achievements
Rank 1
Deyan
Telerik team
Share this question
or