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

4 posts, 0 answers
  1. Eljay
    Eljay avatar
    10 posts
    Member since:
    Dec 2011

    Posted 31 Jan 2012 Link to this post

    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)?
  2. Petar Marchev
    Admin
    Petar Marchev avatar
    968 posts

    Posted 03 Feb 2012 Link to this post

    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).

  3. UI for WinForms is Visual Studio 2017 Ready
  4. Eljay
    Eljay avatar
    10 posts
    Member since:
    Dec 2011

    Posted 03 Feb 2012 Link to this post

    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 
  5. Petar Marchev
    Admin
    Petar Marchev avatar
    968 posts

    Posted 08 Feb 2012 Link to this post

    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 >>
Back to Top