This question is locked. New answers and comments are not allowed.
HI Telerik,
I am showing time series on x axis ranging from 1/1/1970 to 12/12/2012 but instead of showing the entire time series I want to show just 4 values like start, end and two in the middle.
Please help me out with this.
Thanks,
-Shashank
I am showing time series on x axis ranging from 1/1/1970 to 12/12/2012 but instead of showing the entire time series I want to show just 4 values like start, end and two in the middle.
Please help me out with this.
Thanks,
-Shashank
7 Answers, 1 is accepted
0
Hello Shashank,
Thank you for your interest.
You can achieve the desired effect by setting the DateTimeContinuousAxis.MaximumTicks property to 4.
I hope this information is useful.
Ivaylo Gergov
the Telerik team
Thank you for your interest.
You can achieve the desired effect by setting the DateTimeContinuousAxis.MaximumTicks property to 4.
I hope this information is useful.
Regards,
Ivaylo Gergov
the Telerik team
Have a suggestion or face a problem - you can use the Ideas & Feedback portal to submit ideas, feedback and vote for them.
0
Shashank
Top achievements
Rank 1
answered on 01 Jun 2013, 09:31 AM
Thanx but i am not able to get where to out it, my graph is as below
previously i was using
now i replaced it with
but i no more see the graph geeting populated, please help
Please help
previously i was using
<telerik:RadCartesianChart.HorizontalAxis>
<telerik:CategoricalAxis LabelStyle="{StaticResource GraphLabelStyle}" LineStyle="{StaticResource GraphLineStyle}"
MajorTickStyle="{StaticResource GraphTickStyle}">
<telerik:CategoricalAxis.LabelTemplate>
<DataTemplate>
<TextBlock />
</DataTemplate>
</telerik:CategoricalAxis.LabelTemplate>
</telerik:CategoricalAxis>
</telerik:RadCartesianChart.HorizontalAxis>
<telerik:CategoricalAxis LabelStyle="{StaticResource GraphLabelStyle}" LineStyle="{StaticResource GraphLineStyle}"
MajorTickStyle="{StaticResource GraphTickStyle}">
<telerik:CategoricalAxis.LabelTemplate>
<DataTemplate>
<TextBlock />
</DataTemplate>
</telerik:CategoricalAxis.LabelTemplate>
</telerik:CategoricalAxis>
</telerik:RadCartesianChart.HorizontalAxis>
now i replaced it with
<telerik:RadCartesianChart.HorizontalAxis>
<telerik:DateTimeContinuousAxis LabelStyle="{StaticResource GraphLabelStyle}" LineStyle="{StaticResource GraphLineStyle}"
MajorTickStyle="{StaticResource GraphTickStyle}"
MaximumTicks="4" >
<telerik:DateTimeContinuousAxis.LabelTemplate>
<DataTemplate>
<TextBlock />
</DataTemplate>
</telerik:DateTimeContinuousAxis.LabelTemplate>
</telerik:DateTimeContinuousAxis>
</telerik:RadCartesianChart.HorizontalAxis>
<telerik:DateTimeContinuousAxis LabelStyle="{StaticResource GraphLabelStyle}" LineStyle="{StaticResource GraphLineStyle}"
MajorTickStyle="{StaticResource GraphTickStyle}"
MaximumTicks="4" >
<telerik:DateTimeContinuousAxis.LabelTemplate>
<DataTemplate>
<TextBlock />
</DataTemplate>
</telerik:DateTimeContinuousAxis.LabelTemplate>
</telerik:DateTimeContinuousAxis>
</telerik:RadCartesianChart.HorizontalAxis>
but i no more see the graph geeting populated, please help
Please help
0
Hello Shashank,
Rositsa Topchiyska
Telerik
I see that in the first code sample you use CategoricalAxis and in the second one – DateTimeContinuousAxis. Please, could you check if your data is of DateTime type, and if not, you could use different axis type.
Here is an article in our online documentation where you can read about all axis types and their properties.
I hope this helps.
Regards,Rositsa Topchiyska
Telerik
Have a suggestion or face a problem - you can use the Ideas & Feedback portal to submit ideas, feedback and vote for them.
0
Shashank
Top achievements
Rank 1
answered on 04 Jun 2013, 04:17 AM
Hi,
I am using a CategoricalAxis, but want to achive maximum ticks as four, which i am not able to unfortunately.
my xaml code is this, please help me achiving maximum ticks with the below code.
<telerik:RadCartesianChart.HorizontalAxis>
<telerik:CategoricalAxis LabelStyle="{StaticResource GraphLabelStyle}" LineStyle="{StaticResource GraphLineStyle}"
MajorTickStyle="{StaticResource GraphTickStyle}">
<telerik:CategoricalAxis.LabelTemplate>
<DataTemplate>
<TextBlock />
</DataTemplate>
</telerik:CategoricalAxis.LabelTemplate>
</telerik:CategoricalAxis>
</telerik:RadCartesianChart.HorizontalAxis>
I am using a CategoricalAxis, but want to achive maximum ticks as four, which i am not able to unfortunately.
my xaml code is this, please help me achiving maximum ticks with the below code.
<telerik:RadCartesianChart.HorizontalAxis>
<telerik:CategoricalAxis LabelStyle="{StaticResource GraphLabelStyle}" LineStyle="{StaticResource GraphLineStyle}"
MajorTickStyle="{StaticResource GraphTickStyle}">
<telerik:CategoricalAxis.LabelTemplate>
<DataTemplate>
<TextBlock />
</DataTemplate>
</telerik:CategoricalAxis.LabelTemplate>
</telerik:CategoricalAxis>
</telerik:RadCartesianChart.HorizontalAxis>
0
Hi Shashank,
Rositsa Topchiyska
Telerik
In your case you could use the MajorTickInterval property of the CategoricalAxis and set it to a value depending on your data collection length. I have attached a project demonstrating how to achieve this.
Let me know if this works for you.
Rositsa Topchiyska
Telerik
Have a suggestion or face a problem - you can use the Ideas & Feedback portal to submit ideas, feedback and vote for them.
0
Shashank
Top achievements
Rank 1
answered on 06 Jun 2013, 03:37 PM
thanks for the response, its working but i am facing a challenge.
I am having 12 values on x axis (for example 1 - 12), and if i choose an interval as 2, 3, 4 and so on i am missing the last value i.e 12 and hence its not getting displayed on x axis
case MajorTickInterval = 2
1, 3, 5, 7, 9, 11 (12 is not being shown)
case MajorTickInterval = 3
1, 4, 7, 10 (12 is not being shown)
case MajorTickInterval = 4
1, 5, 9 (12 is not being shown)
case MajorTickInterval = 5
1, 6, 11 (12 is not being shown)
case MajorTickInterval = 6
1, 7 (12 is not being shown)
Can there be any way so that i can show compulsary the 1st and the last range i.e. 1 & 12, and some values in between might be like 5 and 9 on X axis. Please suggest its urgent
I am having 12 values on x axis (for example 1 - 12), and if i choose an interval as 2, 3, 4 and so on i am missing the last value i.e 12 and hence its not getting displayed on x axis
case MajorTickInterval = 2
1, 3, 5, 7, 9, 11 (12 is not being shown)
case MajorTickInterval = 3
1, 4, 7, 10 (12 is not being shown)
case MajorTickInterval = 4
1, 5, 9 (12 is not being shown)
case MajorTickInterval = 5
1, 6, 11 (12 is not being shown)
case MajorTickInterval = 6
1, 7 (12 is not being shown)
Can there be any way so that i can show compulsary the 1st and the last range i.e. 1 & 12, and some values in between might be like 5 and 9 on X axis. Please suggest its urgent
0
Hi Shashank,
Currently there is no other way to alter the tick and label step for a Categorical axis. Nevertheless you may add this functionality as a feature request and if there is enough interest for it we will consider implementing it.
I hope this information is useful.
Regards,
Georgi
Telerik
Currently there is no other way to alter the tick and label step for a Categorical axis. Nevertheless you may add this functionality as a feature request and if there is enough interest for it we will consider implementing it.
I hope this information is useful.
Regards,
Georgi
Telerik
Have a suggestion or face a problem - you can use the Ideas & Feedback portal to submit ideas, feedback and vote for them.