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

RadChart dataload w/multi array set

1 Answer 46 Views
Chart
This is a migrated thread and some comments may be shown as answers.
Erik
Top achievements
Rank 1
Erik asked on 13 Jan 2011, 07:58 PM
I'm trying to get data loaded into a RadChart, but what I have to work with is coming back multi dimensional.
e.Result would look like this:

+[0] - count 2   - drilling down into it [0] {EntName, Stack}
                                                      [1] {Column1, 52}
+[1] - count 2  - drilling down into it [0] {EntName, Dup}
                                                     [1] {Column1, 21}
+[2] - count 2  - drilling down into it [0] {EntName, Revi}
                                                     [1] {Column1, 79}

+[3] - count 2  -etc...

So when I try and populate the Chart it just shows say 4 bars all set to the value 2.  I've tried looping through the e.Result set like such below to isolate each row, but the data doesn't load at all when I try and add it to the RadChart.ItemsSource.  Anyone know how I can accomplish this??

 

 

Int

 

eCnt = e.Result.Count;

 

 

for (Int x = 0; x <= eCnt; x++)

 

{ 
var resultSetValues = e.Result[x];

 

 

}

 

1 Answer, 1 is accepted

Sort by
0
Giuseppe
Telerik team
answered on 14 Jan 2011, 12:13 PM
Hello Erik,

As noted in the chart databinding documentation here, the control can be databound to enumerable collection of business objects, or to nested collection of business objects (collection of collections of business objects). If your data comes in different format that cannot be described correctly with automatic or manual SeriesMappings / ItemMappings, you will need to transform it prior to passing it to the chart control.


Best wishes,
Freddie
the Telerik team
Let us know about your Windows Phone 7 application built with RadControls and we will help you promote it. Learn more>>
Tags
Chart
Asked by
Erik
Top achievements
Rank 1
Answers by
Giuseppe
Telerik team
Share this question
or