We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date

Dynamic Series

hi ,

How to create a series dynamically  in code behind for chart.
Please help me.

thank You ,

5 Replies

DP Deepaa Pragaasam Syncfusion Team October 23, 2015 01:39 PM UTC

Hi Vijayakumar,
Thanks for contacting Syncfusion Support.
We have analyised your query and created a sample to add series dynamically in the code behind technique.
We have created the series object in code behind and added data to it.
Code Example:


Series series1 = new Series();

            series1.Type = Syncfusion.JavaScript.DataVisualization.SeriesType.Column;

            //Add Chart data

            List<Data> data1 = new List<Data>();

            Random yValue = new Random();

            for (int i = 0; i < 20; i++)


                data1.Add(new Data(i, yValue.Next(10, 50)));


            //DataSource Bind to the Series


            //Bind DataSource for Series 1

            this.Chart1.Series[0].DataSource = data1;

            this.Chart1.Series[0].XName = "Xvalue";

            this.Chart1.Series[0].YName = "YValue1";

We have prepared a sample according to your requirement
Please let us know if you have any concerns

VI Vijaykumar October 25, 2015 04:09 AM UTC

Hi Deepaa ,

Thanks for your quick response. 

VI Vijaykumar October 26, 2015 04:32 AM UTC

hi ,
Please send the same code for VB.net

thank You,

VI Vijaykumar October 26, 2015 04:47 AM UTC

hi ,

VB.NET code not needed sorry for the inconvenience case 

PG Pon Geetha A J Syncfusion Team October 26, 2015 06:45 AM UTC

Hi VIjaykumar,
Thanks for the update. Please let me know if you need any further assitance.

Live Chat Icon For mobile
Up arrow icon