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.
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Dynamic Series

Thread ID:

Created:

Updated:

Platform:

Replies:

120868 Oct 23,2015 10:42 AM UTC Oct 26,2015 06:45 AM UTC ASP.NET Web Forms 5
loading
Tags: Chart
Vijaykumar
Asked On October 23, 2015 10:42 AM UTC

hi ,

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

thank You ,
Vijayakumar.s

Deepaa Pragaasam [Syncfusion]
Replied On 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:
[Default.aspx.cs]

  

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

            this.Chart1.Series.Add(series1);


            //Bind DataSource for Series 1

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

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

            this.Chart1.Series[0].YName = "YValue1";
            this.Chart1.DataBind();
Screenshot:

We have prepared a sample according to your requirement
 http://www.syncfusion.com/downloads/support/forum/120868/ze/WebApplication643790636
Please let us know if you have any concerns
Regards,
Deepaa.


Vijaykumar
Replied On October 25, 2015 04:09 AM UTC

Hi Deepaa ,

Thanks for your quick response. 

Vijaykumar
Replied On October 26, 2015 04:32 AM UTC

hi ,
Please send the same code for VB.net

thank You,
Vijayakumar.s

Vijaykumar
Replied On October 26, 2015 04:47 AM UTC

hi ,

VB.NET code not needed sorry for the inconvenience case 

Pon Geetha A J [Syncfusion]
Replied On October 26, 2015 06:45 AM UTC

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

CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

;