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

Some question about charting

4 Answers 39 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Michele
Top achievements
Rank 2
Michele asked on 28 Aug 2009, 01:58 PM
Hello,
Please excuse if I continue writing on the forum, but I'm new to reporting and I found it not so natural ...
Here're my lastest problem :

  • How do I add on Y Axes a description? I've got 11 items, 1,2,3,4,5,6,7,8,9,10,11 I would like to see "Class 1","Class 2" ....
  • The Y items are sorted in the chart strarting from 1 in the square of the bar chart going to 11 on top, how can I reverse them? I've tried sorting the collection by code, but no luck
  • I've set on X asses a Stepping of 20, on range 0-100 but I see a 10 stepping...why?

Thanks in advance


Paolo

4 Answers, 1 is accepted

Sort by
0
Accepted
Giuseppe
Telerik team
answered on 02 Sep 2009, 03:07 PM
Hi Paolo,

Onto your questions:

  • We suppose you are using horizontal orientation for your chart and you would like to add description for the vertical axis (in this case this is the XAxis) -- you can customize the axis labels like this:
private void chart1_NeedDataSource(object sender, EventArgs e) 
    ChartSeries series = new ChartSeries(); 
    series.AddItem(10); 
    series.AddItem(20); 
    series.AddItem(30); 
    series.AddItem(40); 
 
    chart1.Series.Add(series); 
 
    chart1.PlotArea.XAxis.AutoScale = false
    chart1.PlotArea.XAxis.AddRange(1, series.Items.Count, 1); 
 
    for (int i = 0; i < chart1.PlotArea.XAxis.Items.Count; i++) 
    { 
        ChartAxisItem axisItem = chart1.PlotArea.XAxis.Items[i]; 
        axisItem.TextBlock.Text = "Class " + i; 
    } 

  • RadChart does not provide support for reversing the order of the series items -- you will need to modify your data and pass it in reverse order to achieve the desired functionality.
  • Make sure you are setting the Axis.AutoScale property to false as otherwise you cannot customize the axis range manually.

Best wishes,
Manuel
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
0
Jaimie
Top achievements
Rank 1
answered on 13 Apr 2010, 02:39 AM
Hey.

RadChart does not provide support for reversing the order of the series items -- you will need to modify your data and pass it in reverse order to achieve the desired functionality.

Can you please provide a example how to do this?

Cheers
0
Jaimie
Top achievements
Rank 1
answered on 27 Apr 2010, 01:29 AM
Can anyone in the team to provide the answer of the question i have asked?

RadChart does not provide support for reversing the order of the series items -- you will need to modify your data and pass it in reverse order to achieve the desired functionality.


Thanks
0
Ves
Telerik team
answered on 29 Apr 2010, 12:29 PM
Hello Jaimie,

I believe in terms of Manuel's example it should look like this:

ChartSeries series = new ChartSeries();  
series.AddItem(40);  
series.AddItem(30);  
series.AddItem(20);  
series.AddItem(10);  

that is... send the items to the chart in reverse order, so that the first item (in this example -- 10) is added last so it appears at the top.

Regards,
Ves
the Telerik team

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 Public Issue Tracking system and vote to affect the priority of the items.
Tags
General Discussions
Asked by
Michele
Top achievements
Rank 2
Answers by
Giuseppe
Telerik team
Jaimie
Top achievements
Rank 1
Ves
Telerik team
Share this question
or