Multiple series on Y-axis

2 posts, 0 answers
  1. John Kok
    John Kok avatar
    9 posts
    Member since:
    Oct 2009

    Posted 20 Dec 2009 Link to this post

    I am programming in Visual Basic.

    Let's say i have 4 arrays (a,b,c,d) with values in them.
    I want to databind these arrays programmaticaly, to a datachart so that that have 4(or n) different series for item on the Y-axis.

    Something like the attached image.

    Can you help me ?
  2. Ves
    Admin
    Ves avatar
    2879 posts

    Posted 23 Dec 2009 Link to this post

    Hello John,

    Unfortunately, RadChart does not support this scenario out of the box. You will need to create the ChartSeries and their items manually. Here is an example:

    double[][] data = new double[][] {....};
     
    ChartSeries series;
    ChartSeriesItem chartSeriesItem;
    foreach (var arr in data)
    {
        series = new ChartSeries();
        foreach (var item in arr)
        {
             chartSeriesItem = new ChartSeriesItem();
             chartSeriesItem.YValue = item;
             series.Items.Add(chartSeriesItem);
        }
        chart.Series.Add(series);
    }


    Best regards,
    Ves
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
  3. UI for WinForms is Visual Studio 2017 Ready
Back to Top