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

AxisX takes future date while Autorange=true

6 Answers 111 Views
Chart
This is a migrated thread and some comments may be shown as answers.
Dipika
Top achievements
Rank 1
Dipika asked on 21 Dec 2011, 07:47 PM
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 !!

6 Answers, 1 is accepted

Sort by
0
Rahul
Top achievements
Rank 2
answered on 23 Dec 2011, 05:49 AM
I'm also having the same issue with Line Series Definition when axis is having autorange=true;
0
Petar Marchev
Telerik team
answered on 23 Dec 2011, 04:04 PM
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 >>

0
Dipika
Top achievements
Rank 1
answered on 26 Dec 2011, 10:24 AM
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?
0
Accepted
Petar Marchev
Telerik team
answered on 28 Dec 2011, 04:47 PM
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 >>

0
Dipika
Top achievements
Rank 1
answered on 30 Dec 2011, 06:56 AM
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
0
Rahul
Top achievements
Rank 2
answered on 30 Dec 2011, 03:28 PM
Hi Dipika,
      Try to set this property for labels.
chart1.DefaultView.ChartArea.AxisX.LabelRotationAngle = 45

Regards
Rahul
Tags
Chart
Asked by
Dipika
Top achievements
Rank 1
Answers by
Rahul
Top achievements
Rank 2
Petar Marchev
Telerik team
Dipika
Top achievements
Rank 1
Share this question
or