Position of chart on screen obviously depends on the incoming data

5 posts, 0 answers
  1. Michael
    Michael avatar
    3 posts
    Member since:
    Jul 2014

    Posted 18 Jul 2014 Link to this post

    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)];




  2. Jack
    Admin
    Jack avatar
    2333 posts

    Posted 21 Jul 2014 Link to this post

    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.

     
  3. DevCraft banner
  4. Michael
    Michael avatar
    3 posts
    Member since:
    Jul 2014

    Posted 21 Jul 2014 Link to this post

    Sorry, my fault. Will not happen again...
    Michael
  5. Klaus
    Klaus avatar
    2 posts
    Member since:
    Apr 2016

    Posted 03 Jun Link to this post

    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

  6. Deyan
    Admin
    Deyan avatar
    2041 posts

    Posted 07 Jun Link to this post

    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
Back to Top
DevCraft banner