Position

TeeChart for Microsoft Visual Studio .NET, Xamarin Studio (Android, iOS & Forms) & Monodevelop.
Post Reply
dotnetjunkee
Newbie
Newbie
Posts: 20
Joined: Fri Dec 05, 2003 5:00 am

Position

Post by dotnetjunkee » Tue Jan 10, 2006 10:09 am

How can I find out the last visible x-value (position) of a series in the
tChart_BeforeDrawSeries-method?

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 Jan 10, 2006 10:17 am

Hi dotnetjunkee,

You can do something like:

Code: Select all

		private void tChart1_BeforeDrawSeries(object sender, Steema.TeeChart.Drawing.Graphics3D g)
		{
			tChart1.Header.Text="Point Index: " + line1.LastVisibleIndex.ToString() + 
													", X Value: " + line1.XValues[line1.LastVisibleIndex].ToString();
		}
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

dotnetjunkee
Newbie
Newbie
Posts: 20
Joined: Fri Dec 05, 2003 5:00 am

Post by dotnetjunkee » Tue Jan 10, 2006 12:03 pm

No, I meant when I'm zooming in. In other words, the x-position at the right hand-side of the zoom window.
narcis wrote:Hi dotnetjunkee,

You can do something like:

Code: Select all

		private void tChart1_BeforeDrawSeries(object sender, Steema.TeeChart.Drawing.Graphics3D g)
		{
			tChart1.Header.Text="Point Index: " + line1.LastVisibleIndex.ToString() + 
													", X Value: " + line1.XValues[line1.LastVisibleIndex].ToString();
		}

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 Jan 10, 2006 2:09 pm

Hi dotnetjunkee,

Ok, then you can use tChart's zoomed event as here:

Code: Select all

		private void tChart1_Zoomed(object sender, System.EventArgs e)
		{
			tChart1.Header.Text="Maximum X Visible Value: " + tChart1.Axes.Bottom.Maximum.ToString();
		}
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