YValue Total per Page

TeeChart for Microsoft Visual Studio .NET, Xamarin Studio (Android, iOS & Forms) & Monodevelop.
Post Reply
mueco
Newbie
Newbie
Posts: 10
Joined: Fri Oct 27, 2006 12:00 am

YValue Total per Page

Post by mueco » Mon Oct 29, 2007 8:07 am

Hi there

Im searching for a solution for getting the Sum (total) for my YValues Collection per Page (the current page).

i tried with:

Code: Select all

g.Chart.Page.Chart.Series[0].YValues.Total;
But im getting the total of the whole chart and not only the current page.

Narcís
Site Admin
Site Admin
Posts: 14730
Joined: Mon Jun 09, 2003 4:00 am
Location: Banyoles, Catalonia
Contact:

Post by Narcís » Tue Oct 30, 2007 9:09 am

Hi mueco,

You can try doing something like this:

Code: Select all

			double pageTotal = 0;

			for (int i = tChart1[0].FirstVisibleIndex; i <= tChart1[0].LastVisibleIndex; i++)
			{
				pageTotal += tChart1[0].YValues[i];
			}
Best Regards,
Narcís Calvet / Development & Support
Steema Software
Avinguda Montilivi 33, 17003 Girona, Catalonia
Tel: 34 972 218 797
http://www.steema.com
Image Image Image Image Image Image
Instructions - How to post in this forum

Post Reply