TeeChart for Microsoft Visual Studio .NET, Xamarin Studio (Android, iOS & Forms) & Monodevelop.
-
pw
- Newbie
- Posts: 57
- Joined: Fri Nov 15, 2002 12:00 am
Post
by pw » Tue Apr 08, 2008 2:26 am
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
-
Narcís
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
-
Contact:
Post
by Narcís » Tue Apr 08, 2008 9:10 am
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++;
}
}
-
pw
- Newbie
- Posts: 57
- Joined: Fri Nov 15, 2002 12:00 am
Post
by pw » Tue Apr 08, 2008 9:54 pm
Thanks, Narcis. Since I was referring to an old post, I was wondering if there are newer methods to count the active series.