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

Need example for data-binding to a chart with multiple series

3 Answers 222 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.
Eljay
Top achievements
Rank 1
Eljay asked on 31 Jan 2012, 08:43 PM
The guide below shows an example for one series (in the example, one list of Products):
http://www.telerik.com/help/winforms/chart-building-radcharts-data-binding-radchart-to-a-generic-list-of-objects.html

How would I data-bind multiple series to a chart (in the example, more than one list of Products)?

3 Answers, 1 is accepted

Sort by
0
Petar Marchev
Telerik team
answered on 03 Feb 2012, 01:45 PM
Hello,

I have attached a file containing some code that demonstrates how to add several series to the chart's series collection and bind them to different properties of the underlying object. 

All the best,
Petar Marchev
the Telerik team

SP1 of Q3’11 of RadControls for WinForms is available for download (see what's new).

0
Eljay
Top achievements
Rank 1
answered on 03 Feb 2012, 06:38 PM
Thanks for the example Petar, but this is not what I was looking for.

After more searching, I'm looking for something like this but in WinForms.
http://telerik.com/help/wpf/radchart-populating-with-data-series-mapping-items-source.html 
0
Petar Marchev
Telerik team
answered on 08 Feb 2012, 03:09 PM
Hi,

The link you have provided refers to our wpf chart. This is a newer control and the win forms chart does not have an equivalent to it for all features.

If I understood you correctly you want to set a different source to each series and this is not possible with the win forms chart. You can either use the approach I previously presented, or you can manually set the items for each series. That means that you'll have to give up any automatic bindings and will need to manually populate the Items of each series.

radChart1.Series[0].Items.Add(new Telerik.Charting.ChartSeriesItem(...
radChart1.Series[0].Items.Add(new Telerik.Charting.ChartSeriesItem(...
 
Regards,
Petar Marchev
the Telerik team
Sharpen your .NET Ninja skills! Attend Q1 webinar week and get a chance to win a license! Book your seat now >>
Tags
Chart (obsolete as of Q1 2013)
Asked by
Eljay
Top achievements
Rank 1
Answers by
Petar Marchev
Telerik team
Eljay
Top achievements
Rank 1
Share this question
or