TeeChart ASP .Net: Adding Multiple Series to same Chart

TeeChart for Microsoft Visual Studio .NET, Xamarin Studio (Android, iOS & Forms) & Monodevelop.
Post Reply
Quant
Advanced
Posts: 142
Joined: Tue Dec 30, 2014 12:00 am

TeeChart ASP .Net: Adding Multiple Series to same Chart

Post by Quant » Mon Mar 16, 2015 11:41 am

We are working on Web Version of TeeChart (ASP .Net). We need to add multiple series to same chart dynamically on button click.
But while adding the second series it replaces the first series?

Here is the sample code that we used:

protected void Button1_Click(object sender, EventArgs e)
{
AddSeries();
}

private void AddSeries()
{
Steema.TeeChart.Styles.Line lineSeries1 = new Steema.TeeChart.Styles.Line();

ch1.Series.Add(lineSeries1);
lineSeries1.FillSampleValues();
count++;
lineSeries1.Title = "Line " + count.ToString();
ch1.Axes.Bottom.Labels.Angle = 90;
}

Christopher
Guru
Posts: 1603
Joined: Fri Nov 15, 2002 12:00 am

Re: TeeChart ASP .Net: Adding Multiple Series to same Chart

Post by Christopher » Mon Mar 16, 2015 2:28 pm

Hello,

The issue here is the capacity to save data between page calls. The TeeChartForNET ASP.NET demo under:

%Program Files%\Steema Software\Steema TeeChart for .NET 2015 4.1.2015.03110\Examples\TeeChartForNET

gives you several examples of how to do this, specifically in the pages:

%Program Files%\Steema Software\Steema TeeChart for .NET 2015 4.1.2015.03110\Examples\TeeChartForNET\Interacting with Charts\Drill Down\SendingClicksCodeBehind\SendingClicksCodeBehindChart.aspx.cs
%Program Files%\Steema Software\Steema TeeChart for .NET 2015 4.1.2015.03110\Examples\TeeChartForNET\Interacting with Charts\Mouseover Hints\ClickElements\ClickElementsChart.aspx.cs
%Program Files%\Steema Software\Steema TeeChart for .NET 2015 4.1.2015.03110\Examples\TeeChartForNET\Interacting with Charts\Scrolling\scrolltool.aspx.cs
%Program Files%\Steema Software\Steema TeeChart for .NET 2015 4.1.2015.03110\Examples\TeeChartForNET\Interacting with Charts\Zooming\WebAppZoomChart.aspx.cs
Best Regards,
Christopher Ireland / Development & Support
Steema Software
Avinguda Montilivi 33, 17003 Girona, Catalonia
Tel: 34 972 218 797
http://www.steema.com
Instructions - How to post in this forum

Post Reply