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

DataBinding to Chart Area

1 Answer 61 Views
Chart
This is a migrated thread and some comments may be shown as answers.
HarryS
Top achievements
Rank 1
HarryS asked on 10 Sep 2010, 10:48 AM
Hi,

Sorry if this is a silly question!

When databinding to a single chart, everthing works fine using:

var DataInfo = new ServiceReferenceChart.ServiceChartClient();
            DataInfo.GetDataInfoCompleted += (s, ea) =>
            {
                this.radChart2.ItemsSource = ea.Result;
}

But I would like to use ChartAreas, and when trying the below, I just get the default 'No Data Series' message.

var DataInfo = new ServiceReferenceChart.ServiceChartClient();
            DataInfo.GetDataInfoCompleted += (s, ea) =>
            {
                ChartAreaSample.ItemsSource = ea.Result;
}


Anyone know why it works for single chart but not Chart Area?
(I have used manual SeriesMappings on both types of charts)

Many Thanks,
Harry

1 Answer, 1 is accepted

Sort by
0
Yavor
Telerik team
answered on 15 Sep 2010, 09:03 AM
Hello Harry,

 When you want to use a custom layout with chart areas you still bind to the data as like using the default layout. The only difference is, that you'll have to say to the series on which chart area to draw itself like this:

<telerikCharting:SeriesMapping CollectionIndex="0" ChartAreaName="webBrowsersShare2008Chart">
You can read more on how to data bind to many chart areas in our help topic here.

 

Sincerely yours,
Yavor Ivanov
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
Chart
Asked by
HarryS
Top achievements
Rank 1
Answers by
Yavor
Telerik team
Share this question
or