AxisX takes future date while Autorange=true

7 posts, 1 answers
  1. Dipika
    Dipika avatar
    4 posts
    Member since:
    Nov 2011

    Posted 21 Dec 2011 Link to this post

    Hi,
    I have list which contain dates and values for x axis and y axis respectively.
    As a Radchart's Itemsource i bound this list, and made its Axisx AutoRange=true;
    because of that it  takes future date which causes a blank data on right side of graph.
    Please find attachment.
    Can anyone help me to find out how I can remove this space ? I want to set its AutoRange=true only..


    Thanks !!
  2. Rahul
    Rahul avatar
    116 posts
    Member since:
    Feb 2011

    Posted 22 Dec 2011 Link to this post

    I'm also having the same issue with Line Series Definition when axis is having autorange=true;
  3. DevCraft banner
  4. Petar Marchev
    Admin
    Petar Marchev avatar
    968 posts

    Posted 23 Dec 2011 Link to this post

    Hi,

    I suggest you read about X-Axis here. This help topic contains information and examples which will be useful to you as they mention a scenario like yours.

    In just a few words - by setting AutoRange="true" you specified that you want the RadChart to automatically extract and set a range. The engine that sets the min and max values for the axis is guided by the input min and max values and the number of the ticks to be shown. Having in mind these things - some values may be rounded, which is what happens in your case.

    The general solution in cases as yours is to set a lower TicksDistance as shown in the provided link. Another solution, of course, is to set the AutoRange to false and manually specify the min and max values.

    Regards,
    Petar Marchev
    the Telerik team

    Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

  5. Dipika
    Dipika avatar
    4 posts
    Member since:
    Nov 2011

    Posted 26 Dec 2011 Link to this post

    Thank you team.
    I tried by giving minimum tickdistance, It gives me accurate range, but ticks get overlap with each other. If I increase tick distance a bit, It shows me same result (showing future dates)..
    Also I tried with Autorange=false, but while scrolling and zooming some time data gets cut in graph, also while minimizing resolution of screen, because of constant ticks, label gets overlap with each other..
    So can you suggest me if I m setting tick distance, than how could i resist them to overlap or If I am using Auto range = false , than how can I control it while scrolling and zooming and also while minimizing resolution of application's page?
  6. Answer
    Petar Marchev
    Admin
    Petar Marchev avatar
    968 posts

    Posted 28 Dec 2011 Link to this post

    Hello,

    If I understand you correctly the labels are overlapping each other. As explained in the previously provided link you can also increase the LabelStep. For instance if you set LabelStep="5" - only 1 in 5 ticks will have a label and this way overlapping can be avoided.

    Another solution to evade the overlapping of the labels is to set a LabelRotationAngle. This approach is also presented in the X-Axis features topic.

    Hope this helps.

    Regards,
    Petar Marchev
    the Telerik team

    Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

  7. Dipika
    Dipika avatar
    4 posts
    Member since:
    Nov 2011

    Posted 30 Dec 2011 Link to this post

    Thanks Petar,
    I used LabelStep, and Its working fine.But it doesn't show appropriate tickpoint for that particular label, as label string is large and in one label we can see many tickpoints..(please refer attached image).So do we have any property/method or style which shows labeled tick point in highlighted mode? 

    Thanks,
    Dipika
  8. Rahul
    Rahul avatar
    116 posts
    Member since:
    Feb 2011

    Posted 30 Dec 2011 Link to this post

    Hi Dipika,
          Try to set this property for labels.
    chart1.DefaultView.ChartArea.AxisX.LabelRotationAngle = 45

    Regards
    Rahul
Back to Top
DevCraft banner