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

Categories chart with manual range

3 Answers 49 Views
Chart
This is a migrated thread and some comments may be shown as answers.
Anatoly Chekh
Top achievements
Rank 1
Anatoly Chekh asked on 11 Aug 2011, 05:41 PM
Hello.

I have a question:

I try to paint bar chart. Use categories for it. Set manual range - min value = 2, max value = 5, step = 1.
Chart bars paint correct (there is no first bar)
But the x-axis label are not correct - it's start from first category. So the first label corresponds to the first category, but the first bar corresponds to the second bar.
The same problem if i set min value 0.
See attachments for more details.

What can I do with this? It there a way to paint labels from corresponding.

Thanks, Anatoly

3 Answers, 1 is accepted

Sort by
0
Peshito
Telerik team
answered on 16 Aug 2011, 02:14 PM
Hello Anatoly Chekh,

Your labels are not correctly displayed because you are setting the min and max range to the XAxis which in your case is a string. This way the chart cannot calculate what items to hide and what to show.

In order to show values in custom range you should better set the YAxis AutoScale property to false and set its min, max and step values.
Checkout the following links to learn more about X-Axis and Y-Axis:
http://www.telerik.com/help/silverlight/radchart-features-axes-x-axis.html
http://www.telerik.com/help/silverlight/radchart-features-axes-y-axis.html

You could also use FilterDescriptor in case you'd wanted to define the sorting member and the sorting direction for the data to which the RadChart is bound.
More about filtering can be found here.

Greetings,
Peshito
the Telerik team
Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get now >>
0
Anatoly Chekh
Top achievements
Rank 1
answered on 18 Aug 2011, 12:17 AM
Hello.

You said "the chart cannot calculate what items to hide and what to show?" The chart show bars correct. So the chart can show labels correct.
Now It seems that in generally XCategory property doesn't have sence - first item always will be displayed by the X = 1, 2 item will be displayed by the X = 2 etc. You can see this on my attachments.

I set XCategory to Walla-Walla, but realy It means than corresponding bar will be have X = 1. Why not 0, -1, ...?
So XCategory for DataPoint is not associated with X Axis labels.
0
Peshito
Telerik team
answered on 23 Aug 2011, 12:05 PM
Hello Anatoly Chekh,

As I already mentioned in my previous post - "the chart cannot calculate what items to hide and what to show?" when it comes to string values.

In your case the number of bars are displayed correct, however if you want to have properly displayed labels try setting a manual range for your Y-Axis which has numeric values.

Kind regards,
Peshito
the Telerik team

Thank you for being the most amazing .NET community! Your unfailing support is what helps us charge forward! We'd appreciate your vote for Telerik in this year's DevProConnections Awards. We are competing in mind-blowing 20 categories and every vote counts! VOTE for Telerik NOW >>

Tags
Chart
Asked by
Anatoly Chekh
Top achievements
Rank 1
Answers by
Peshito
Telerik team
Anatoly Chekh
Top achievements
Rank 1
Share this question
or