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

Define Xaxis and Yaxis from a list

5 Answers 123 Views
Chart (obsolete as of Q1 2013)
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Martijn
Top achievements
Rank 1
Martijn asked on 18 Jul 2007, 10:28 AM
I have a list containing objects ' Customers' . Each object contains an Id, Name, Date and NumberOfOrders.

Now i want the Xaxis spread out each customers and the Yaxis represent the NumberOfOrders.

radChart.DataSource = (list) Customers; 
* radChart.Xaxis = customers.id; * 
* radChart.Yaxis = customers.numberOfOrders; * 
radChart.Databind(); 
 
 


How can i do this in C# code?

5 Answers, 1 is accepted

Sort by
0
Dwight
Telerik team
answered on 19 Jul 2007, 09:26 AM
Hi Martijn,

Please, excuse us for the delayed replay. The following code should do the trick:

radChart1.DataSource = customers; 
radChart1.DataManager.ValuesYColumns = new string[] {"numberOfOrders"}; 
radChart1.PlotArea.XAxis.DataLabelsColumn = "id"

If you have any other problems regarding our controls, just write us back.

 
Regards,
Evtim
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
0
Martijn
Top achievements
Rank 1
answered on 26 Jul 2007, 12:11 PM
This did the trick to define the Y-axis data, but somehow the colums are not printed right. The first five colums are placed in one column:

[img]http://www.vandeel.com/meuk/radGraph.jpg[/img]
http://www.vandeel.com/meuk/radGraph.jpg

According to this there are five sessions made, but there is only one session needed.
How can i fix this?
0
Vladimir Milev
Telerik team
answered on 30 Jul 2007, 04:05 PM
Hello martijntijn,

Can you please provide us with a sample database (preferably ms access) that we can use to reproduce this behavior?

All the best,
Vladimir Milev
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
0
Martijn
Top achievements
Rank 1
answered on 31 Jul 2007, 07:36 AM
I`m using a SQL 2005 database.

I`m posting a screenshot from the database:
[img]http://www.vandeel.com/meuk/ReportsSqlDatabase.png[/img]
ReportsSqlDatabase.png
0
Dwight
Telerik team
answered on 03 Aug 2007, 11:49 AM
Hi  Martijn,

We could not reproduce the issue. Could you, please, provide us with a sample application which exposes the incorrect behavior.

Check the demo project, it works fine.

Greetings,
Evtim
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
Tags
Chart (obsolete as of Q1 2013)
Asked by
Martijn
Top achievements
Rank 1
Answers by
Dwight
Telerik team
Martijn
Top achievements
Rank 1
Vladimir Milev
Telerik team
Share this question
or