Page 1 of 1

TeeChart ASP .Net: Adding Multiple Series to same Chart

Posted: Mon Mar 16, 2015 11:41 am
by 16071129
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;
}

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

Posted: Mon Mar 16, 2015 2:28 pm
by Christopher
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