Page 1 of 1

active line series count

Posted: Tue Apr 08, 2008 2:26 am
by 6923298
Referring to an old post http://www.teechart.net/support/viewtop ... ive+series, is there any way I could count the number of active line series in the .NET V3?

Based on the old post, I'm currently calculating it with the following code:

Code: Select all

                
j=0;
for (int i = 0; i < tChart1.Series.Count; i++)
                {
                    if (tChart1[i].Visible == true)
                    {
                        j++;
                    }
                }
Thanks

Posted: Tue Apr 08, 2008 9:10 am
by narcis
Hi pw,

Same approach needs to be used in TeeChart for .NET v3. Which is the problem with the code you posted?

You could also use something like this:

Code: Select all

			int count = 0;

			foreach (Steema.TeeChart.Styles.Series s in tChart1.Series)
			{
				if (s.Active )
				{
					count++;
				}
			}

Posted: Tue Apr 08, 2008 9:54 pm
by 6923298
Thanks, Narcis. Since I was referring to an old post, I was wondering if there are newer methods to count the active series.