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

RadDomainDataSource and ChartView

1 Answer 54 Views
ChartView
This is a migrated thread and some comments may be shown as answers.
Mindy
Top achievements
Rank 1
Mindy asked on 08 Aug 2012, 09:19 PM
Hello,  I'm trying to bind data to a chart using the RadDomainDataSource however my chart is not returning values.  Below is the code I'm using.  I would like to know first of all if I have everything set up correctly?  I also wanted to know if "DataView" in the ItemSource should be unique per project, or will it be the same all the time?

 

 

 

<telerik:RadDomainDataSource x:Name="xRadDomainDataSource" QueryName="GetProtocolsQuery" 
                                                                    AutoLoad="True">
            <telerik:RadDomainDataSource.DataContext>
                <service:iTRACKContext/>
            </telerik:RadDomainDataSource.DataContext>
  
        </telerik:RadDomainDataSource>
              <telerik:RadCartesianChart x:Name="chart" Width="222">
                    <telerik:RadCartesianChart.HorizontalAxis>
                        <telerik:CategoricalAxis/>
                    </telerik:RadCartesianChart.HorizontalAxis>
  
                    <telerik:RadCartesianChart.VerticalAxis>
                        <telerik:LinearAxis Maximum="100"/>
                    </telerik:RadCartesianChart.VerticalAxis>
  
                    <telerik:RadCartesianChart.Series>
                        <telerik:BarSeries CombineMode="Stack" ItemsSource="{Binding DataView, ElementName=xRadDomainDataSource}" ValueBinding="Duration" CategoryBinding="FundingID"
                                           ShowLabels="True">
  
                         
                        </telerik:BarSeries>
                    </telerik:RadCartesianChart.Series>
  
                </telerik:RadCartesianChart>

1 Answer, 1 is accepted

Sort by
0
Yavor
Telerik team
answered on 13 Aug 2012, 10:36 AM
Hello Mindy,

From the code you shared I can't see any immediate problem. The chartview is a data control and can visualize any data that is in the form of IEnumerable.  You can place a gridview in the place of your chartview to see if the data is reachable.

I have prepared for you a small project that demonstrates how you can databind chartview to RIA services.

Greetings,
Yavor
the Telerik team

Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

Tags
ChartView
Asked by
Mindy
Top achievements
Rank 1
Answers by
Yavor
Telerik team
Share this question
or